Confirmation pop up box before selecting where condition (1 Viewer)

jd_boss_hogg

Registered User.
Local time
Today, 11:56
Joined
Aug 5, 2009
Messages
88
Hi All.... ive got a little coding to do, and don't really know where to start.
I have the following running a report from a button.

Code:
stLinkCriteria = "[account]=" & "'" & Me![Account] & "'"
        
    DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria

Account is for example A01. However, recently we have changed some account numbers to add E (euros) or D (dollars) to the original number (so A01E and A01D). Now, when i run the report, i only get the recent account orders since the change. Is there anyway i can add some "ors" into the where clause above so i can then run the report for A01, A01E and A01D all in the same report list ?

so where account = me!account or me!account & "E" or me!account & "D"

thanks for any suggestions.
 

RuralGuy

AWF VIP
Local time
Today, 03:56
Joined
Jul 2, 2005
Messages
13,826
Try:
stLinkCriteria = "[account]= '" & Me![Account] & "'" & _
" OR [account]= '" Me![Account] & "E'" & _
" OR [account]= '" Me![Account] & "D'"
 

Users who are viewing this thread

Top Bottom