Print selected records from combo Where Date

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Here is my cod
I have tried to put date literals around paid date and it wont work any idea
Dim strDocName As Strin
Dim strWhere As Strin

strDocName = "rptGSTCollected
strWhere = "[PaidDate] =" & Forms!frmGstCollected![chooseMonth] & " '
DoCmd.OpenReport strDocName, acPreview, , strWhere
 
strWhere is a little confusing! [PaidDate] implies something like 4/17/04 but
[ChooseMonth] implies something like April!

Assuming you want ChooseMonth to be April, you need a single quote after the
equal sign so that strWhere comes out as:
[PaidDate] = 'Forms!frmGstCollected![chooseMonth]'
 
Back
Top