Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print form and subform

Status
Not open for further replies.

zxmax

Technical User
Nov 24, 2003
179
CA
I have a Form with subform , In my subform i have a Print option, that allow me to print a report ,

My problem is, every time run that report, it shows all the records, of the database for that subform ,
i would like it to print only the current Record,

Eg:

In my main form, i have "UserID" , "firstName" , "LastName", "PhoneNumber"
In my subform , i have some transaction related to the main form,

I was advised to use this
dim strWhere as string

strWhere="Ref=" & forms!myform!reffield
docmd.openreport "ReportName",asviewpreview,strWhere

For the line: strWhere="Ref=" & forms!myform!reffield
what is the Ref= ? and the reffeild ?

Is that the Feild ID name ?

Thanks for any input, or if you have any other solutions please advise

Thanks alot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top