I had a memory blank......

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

Guest

I know how to do it, I just forgot how or something.....

I need to open a report (I have the command button already) that has two
different criteria to open the corresponding data.

Primary concern - 1. DATE. as in today's date
2. select the correct (displayed/all) primary key

Like I said I just have blanked.
 
Do you mean the following:

Dim strReportName as string
DIM strWHere as string
strReportName = "rptSomeReport"
strWhere = "SomeDate = #" & format(date, "mm/dd/yyyy") & "#"

DoCmd.OpenReport strReportName, acNormal, , strWhere
 
You can use the criteria statement if using DoCmd.OpenReport. Connect the
different criteria with the "AND" and should be good to go.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top