Creating report for one record

  • Thread starter Thread starter Patryk Królikowski
  • Start date Start date
P

Patryk Królikowski

Hey,

Have a problem. It's the first time ever for me so don't laugh - it's
probably super easy. I just created a beautiful report for my database but
when I open it I cannot restrict it to only one record - it just shows me
all the records possible. How can I select just one record to be reported ?.
I'm using field called CCID to determine a client. So the conclusion is :
When I open the report I want to be able to choose a client for which it
should be printed.
Thanx

Pat
 
Patryk Królikowski said:
Hey,

Have a problem. It's the first time ever for me so don't laugh - it's
probably super easy. I just created a beautiful report for my database but
when I open it I cannot restrict it to only one record - it just shows me
all the records possible. How can I select just one record to be reported ?.
I'm using field called CCID to determine a client. So the conclusion is :
When I open the report I want to be able to choose a client for which it
should be printed.

If CCID is a number...
DoCmd.OpenReport "ReportName",,,"CCID=123"

If CCID is text...
DoCmd.OpenReport "ReportName",,,"CCID='123'"

If you want to filter on a TextBox value on the same form...

number...
DoCmd.OpenReport "ReportName",,,"CCID=" & Me!TextBoxName

text...
DoCmd.OpenReport "ReportName",,,"CCID='" & Me!TexBoxName & "'"
 
Back
Top