Results 1 to 3 of 3

Thread: If And

  1. #1
    Join Date
    Feb 2004
    Location
    UK
    Posts
    246

    Unanswered: If And

    Hi,
    This probably sound really stupid but how do I create a VBA statement like the following

    If Me.fieldname = "Yes" and Me.fieldname2 = "Fred" then
    docmd.........


    It doesn't seem to work structured like that, how should it be structured?

    Regards
    John

  2. #2
    Join Date
    Jun 2004
    Location
    Terrapin Nation
    Posts
    205
    you got it right. if it isnt working then maybe you want 'Or' instead of 'And'

  3. #3
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    And when all else fails, fully qualify the conditional ... (A.K.A. - use parentheses)
    Back to Access ... ADO is not the way to go for speed ...

Posting Permissions

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