It's a common solution to put a command button on your form that will open
your report. Set the criteria to limit your report to a value on the form.
An example:
Private Sub PrintForm_Click()
On Error GoTo Err_PrintForm_Click
Dim DocName As String
Dim LinkCriteria As String
DoCmd.DoMenuItem A_FORMBAR, A_FILE, A_SAVERECORD
DocName = "MemRecord"
LinkCriteria = "[V-ID] = Forms![MemEntry]![V-ID]"
DoCmd.OpenReport DocName, A_PREVIEW, , LinkCriteria
Exit_PrintForm_Click:
Exit Sub
Err_PrintForm_Click:
MsgBox Error$
Resume Exit_PrintForm_Click
End Sub
The command button wizard will do most all of this for you.
-Ed
"Gt394" <g4****@hotmail.com> wrote in message
news:43***********************@news.optusnet.com.a u...
I have a form called frm_quote and a report called rpt_quote.
I want to be able to view the form on a particular quote number (field:
QuoteNo - autonumber) and then go to the report where the the info on that
particular quote no. is shown in the report.
frm_quote is linked to query: qry_viewquote
rpt_quote is linked to: qry_viewquoterpt
In design of qry_viewquoterpt - I simply have the expression (for the
field: QuoteNo ) [Enter Quote No]. This method does the job however I
would like it to automatically recognize the quote number as described
earlier without this manual input of the user.
thanks.