Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20
  1. #16
    ssanfu is offline Master of Nothing
    Windows 2K Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Why don't you have a control for First Name and another control for Last Name since you are splitting the name anyway??? You can always concatenate the first and last to get the full name.



    Then you can check for first and last - if either control is empty/null, then set the focus to the control that has missing data with an error message to fill in the control.

    BTW, how do you handle names like "Jose De La Cruz", "Emilo De Leon Arroyo" or "Annie Lynn Wilson"???

  2. #17
    josephff is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    11
    Quote Originally Posted by ssanfu View Post
    Why don't you have a control for First Name and another control for Last Name since you are splitting the name anyway??? You can always concatenate the first and last to get the full name.

    Then you can check for first and last - if either control is empty/null, then set the focus to the control that has missing data with an error message to fill in the control.

    BTW, how do you handle names like "Jose De La Cruz", "Emilo De Leon Arroyo" or "Annie Lynn Wilson"???

    agreed, i had already thought about this. However by the time i realized i needed both the first name and last name seperately i had already coded lots the other way so i was trying to work with what i already started.

    Haha didnt get that far yet with multiple names :P

    Thanks for all your help guys, i think i will revamp and go with 2 controls instead of one.....except for now my access is crashing again when trying to enter the code designer...second time its happened and not sure how i fixed it the first time.

    Thanks again

  3. #18
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Just a hint: we usually do validation in the BeforeUpdate event of the controls. If there is a problem then set Cancel = True to hold the focus in that control.

  4. #19
    josephff is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    11
    Quote Originally Posted by RuralGuy View Post
    Just a hint: we usually do validation in the BeforeUpdate event of the controls. If there is a problem then set Cancel = True to hold the focus in that control.

    very cool ill give that a shot too. That sounds a lot cleaner.

    im just a noob learning by doing and everytime i build something i learn a little more.

    Thanks

  5. #20
    ssanfu is offline Master of Nothing
    Windows 2K Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    im just a noob learning by doing and everytime i build something i learn a little more.
    Been working with databases since dBase III and FileMaker Pro (Mac) - and I'm *still* learning!! (it means I'm not dead yet!!!)

    It's good you fixing the First Name/ Last Name problem now - it is MUCH harder to fix it later, after you have been using it for a year (or more).

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Error 2501 displays with Error handling
    By agent- in forum Programming
    Replies: 13
    Last Post: 08-05-2011, 02:20 PM
  2. Error Handling
    By jgelpi16 in forum Programming
    Replies: 4
    Last Post: 09-14-2010, 12:17 PM
  3. Error Handling
    By trb5016 in forum Access
    Replies: 2
    Last Post: 08-10-2010, 08:37 AM
  4. #error handling
    By mws5872 in forum Access
    Replies: 4
    Last Post: 05-12-2010, 07:06 AM
  5. Error Handling for newbie
    By smikkelsen in forum Access
    Replies: 4
    Last Post: 04-08-2010, 05:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums