Results 1 to 5 of 5
  1. #1
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Confusing error message (2002)

    Hi,

    I have the following code on the

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Confusing error message (2002)

    I'm confused by all those names with varying numbers of underscores. What is the name of the text box whose SetFocus event this code is for? (And why do you use the SetFocus event?)

  3. #3
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Confusing error message (2002)

    Hi Hans,

    The underscores is how they come up because the name of the field as an * in it. Instead of putting in the * Access put in an underscore.
    The name of the field that needs to have the set focus is

    Me.status_4_If_No.SetFocus

    I used the set focus so that if the previous text box on the form is disabled, and the user hits the tab button, they will go to the next appropriate box on the form.

    Leesha

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Confusing error message (2002)

    That's a good reasing for not using * or other unusual characters in the names of fields, controls and database objects.

    Let me try again: the code you posted is part of an event procedure: Private Sub ...
    What is the name of that procedure, in other words what does it say after the word Sub?

  5. #5
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Confusing error message (2002)

    >>That's a good reasing for not using * or other unusual characters in the names of fields, controls and database objects.

    Yep, I realized that after I set up the table, but the table was so big (many questions on this questionnaire) I decided in the essence of time not to go back and change them.

    >>Let me try again: the code you posted is part of an event procedure: Private Sub ...
    What is the name of that procedure, in other words what does it say after the word Sub?

    Uhmmmmmmmmmm when I went to copy this for you I noted it was set to the "before update" not "after update" where I intended it. Now I understand why I was getting the error on this one and not on the other fields that I set up the same way.

    Thanks Hans!

Posting Permissions

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