I had a memory blank......

J

Joseph

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.
 
B

Bill Edwards

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
 
S

smk23

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