Results 1 to 7 of 7
  1. #1
    Join Date
    May 2009
    Posts
    7

    Unanswered: Help with form data entry

    I would like to create some code that would automatically populate a form field with "NA" if the data in another field equaled a certain value.
    For example, if the value entered into field A is "shipped" then the value of field B would become "NA".

    I appreciate your help and suggestions in advance.

  2. #2
    Join Date
    May 2005
    Posts
    1,191
    In the afterUpdate event of A, do like:

    on error resume next
    If me.fldA = "shipped" then me.fldB = NA

    (untested code)
    Me.Geek = True

  3. #3
    Join Date
    May 2009
    Posts
    7

    Method or data member not found

    Thanks nckdryr, but didnt work. I got the error in title although im sure of the field names.

  4. #4
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    You would have to replace fldA and fldB with the names of your 2 controls. You would also want quotes around the NA.
    Paul

  5. #5
    Join Date
    May 2005
    Posts
    1,191
    Thanks Paul. Forgot the quotes in my haste.
    Me.Geek = True

  6. #6
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    No problem Nick. Sorry for jumping in. Your little light was off, so I didn't think you were online.
    Paul

  7. #7
    Join Date
    May 2005
    Posts
    1,191
    Ya, I logged in about four minutes after you posted it looks like
    Me.Geek = True

Posting Permissions

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