Results 1 to 3 of 3
  1. #1
    PeakH is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Posts
    143

    Must not have syntax correct. VBA shouldn't ask for parameter but when run on click, still asks.

    I have a button to open a form that allows a user to look at orders based on the delivery date [DelDate] and the [Seller]. When it was just the delivery date, everything seemed to work well, but then I needed to add a specific seller and now every time I open the form it asks me to input the seller, but I don't know why... the information should already be there. I'm thinking that I don't have the syntax correct, but when I look it up it looks like how I already have it...



    Code:
    DoCmd.OpenForm "frmInvoiceNumbers", acNormal, , "[DelDate]>= #" & Me.comboMonth & "/" & Me.comboDay & "/" & Me.comboYear & "# AND [DelDate]<= #" & Me.comboToMonth & "/" & Me.comboToDay & "/" & Me.comboToYear & "# And [Seller] like '*Choice'"
    Any thoughts?
    Thanks in advance!

  2. #2
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726

  3. #3
    PeakH is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Posts
    143
    I just re-typed it and that seemed to work... must have just had a stray period or apostrophe...

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

Similar Threads

  1. Replies: 1
    Last Post: 11-02-2016, 12:41 PM
  2. Replies: 3
    Last Post: 02-29-2016, 12:12 AM
  3. Replies: 3
    Last Post: 08-02-2014, 09:48 PM
  4. Replies: 8
    Last Post: 05-16-2014, 01:21 PM
  5. Replies: 12
    Last Post: 06-25-2013, 12:52 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