Results 1 to 4 of 4
  1. #1
    alsoto is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Apr 2009
    Posts
    67

    Multiple Fields in Criteria - String

    Can someone please tell me what's wrong with my string:



    DoCmd.OpenForm "frmAttendanceMain2", , , "[CourseCode] = '" & Me.CC & "'" AND [CourseDate] = '" & Me.CD & "'"

    Thanks,
    Al

  2. #2
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    Your CourseDate has to be couched in # signs - like this:
    And [Coursedate] = #" & Me.CD & "#"

    I hope this helps.

  3. #3
    alsoto is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Apr 2009
    Posts
    67

    It Did help

    THANKS!!!
    Al

  4. #4
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    You're Welcome! I'm happy I could help.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. FindFirst with multiple fields in criteria
    By compooper in forum Programming
    Replies: 5
    Last Post: 07-22-2011, 10:29 AM
  2. Replies: 1
    Last Post: 03-20-2011, 09:21 AM
  3. Multiple Criteria in a string
    By cksm4 in forum Programming
    Replies: 3
    Last Post: 08-04-2010, 11:54 AM
  4. How to Concatenate String Criteria
    By ColPat in forum Programming
    Replies: 2
    Last Post: 06-26-2010, 08:48 PM
  5. Replies: 1
    Last Post: 03-22-2010, 03:37 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