Certainly, If ID is numeric:
DoCmd.OpenReport "ReportName", , , "[ID]=" & Me![txtID]
If ID is text
DoCmd.OpenReport "ReportName", , , "[ID]=" & "'" & Me![txtID] & "'"
Arvin Meyer, MCP, MVP
Free Access downloads:
> Thanking you for your reply:
> I have done so. The report looks good with report and subreport.
> Now what I have got so far:
> After the user completes the data entry form, another form
> opens where they have to double click to choose the report for that
> form to print or preview.
> Is there a way to have the user click on a button on the data entry form
> to print my report that relates to that entry, without going to my other
> to print the report.
> Peter McCartney
> > > Hello All!
> > > I have a main form with a subform underneath. All works well.
> > > Now I am printing the form as a report for a handout.
> > > The form prints out but the information on the subform does not.
> > > Also after I click my button to print the form the info in the subform
> > > disappears.
> > > The subform is set for a datasheet. Even if it is changed to a form it
> > still
> > > doesn't work.
> > > Must be doing something wrong, any ideas.
> > Change your printing from a form to a report. Forms do not have all the
> > print formatting options that reports do. If you need help, post back to
> > this thread with the particulars.
> > --
> > Arvin Meyer, MCP, MVP
> > Microsoft Access
> > Free Access downloads:
> > http://www.datastrat.com