+ Reply to Thread
Results 1 to 3 of 3

UserForm Methods

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    03-30-2010
    Location
    Manchester England
    MS-Off Ver
    Excel 2010
    Posts
    992

    UserForm Methods

    Dear Members

    I have been unable to solve a problem concerning a UserForm used to pickup data from one list, to enable the addition of further data ,and lastly to load the complete record to another list.
    The problem appeared when I tried to institute a check to prevent the loading of the complete record if some fields had been left empty. I use a message box to give a warning, and when this is cleared the userform is available for completion. Unfortunately all the fields that had been correctly entered in the first place are now empty when I wanted them retained.

    I have attached a copy of the application which I hope will make all this clear.
    The password is magpie. The sequence Open/Enter Record/Enter Record will get you to the problem.
    The top row of fields in userform1 are populated by selecting an order in the listbox.
    The lower row of fields are populated manualy. The problem occurs if you leave one of these blank and then press "Enter Record".
    Any help would be very appreciated
    John
    Attached Files Attached Files
    Last edited by j_Southern; 04-15-2011 at 05:22 AM.

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,983

    Re: UserForm Methods

    Your code proceeds with EnterRecord even if frmCheck fails and raises the message. I suggest you change frmCheck to a function that returns True if it succeeds and False otherwise, then you can use:
    If frmCheck then EnterRecord
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Forum Contributor
    Join Date
    03-30-2010
    Location
    Manchester England
    MS-Off Ver
    Excel 2010
    Posts
    992

    Re: UserForm Methods

    RomperStomper
    Many thanks, using a function was just what I needed to do
    John

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1