Results 1 to 4 of 4
  1. #1
    bidbud68 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    19

    Correct Syntax For DoCmd

    Hi please could you let me know the correct syntax to send through 2 strings for the below DoCmd :



    DoCmd.OpenReport "Invoices For Month End Emailing", acViewNormal, , "Reservations.ReservationID=" & rstInvoices![Reservations.ReservationID]

    The string : "Reservations.ReservationID=" & rstInvoices![Reservations.ReservationID] works fine and its the first string I need then I need to pass another string as well : "Accounts.Date=" & rstInvoices![Accounts.Date]

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    If it's a date field:

    "Reservations.ReservationID=" & rstInvoices![Reservations.ReservationID] & " AND Accounts.Date= #" & rstInvoices![Accounts.Date] & "#"
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    bidbud68 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    19
    Thank you thats great

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    No problem.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Correct Syntax
    By bidbud68 in forum Programming
    Replies: 6
    Last Post: 10-19-2012, 01:09 AM
  2. DCount Syntax Correct?
    By Huddle in forum Access
    Replies: 2
    Last Post: 06-21-2012, 03:06 PM
  3. SQL Correct Syntax
    By tbassngal in forum Queries
    Replies: 11
    Last Post: 09-01-2011, 01:55 PM
  4. dcount syntax correct?
    By lbgtp in forum Reports
    Replies: 2
    Last Post: 12-29-2010, 10:01 AM
  5. What is the correct syntax for
    By giladweil in forum Access
    Replies: 1
    Last Post: 07-29-2010, 04:56 AM

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