davegauthier
New member
- Local time
- Today, 11:08
- Joined
- Dec 10, 2005
- Messages
- 8
I need to print a report based on a single record taken from a group of records. The one record I want to print in the report would be the record currently being viewed in the main form.
This is a client database. I have multiple tables with all information connected with Client ID's and relationships.
I need to be able to click a button on the form and view and/or print a report for only the record being viewed at that time. I do not want to ask the user to enter the Client ID in a dialog box, I want it to be more streamlined then that.
I have tried coding the command button as follows:
Dim stDocName As String
Dim strWhere As String
stDocName = "rptOneRecord"
stWhere = "[Client ID]=" & Me!ClientID
DoCmd.OpenReport stDocName, acPreview, , strWhere
And the report does open, but without any infomation on it whatsoever.
Any suggestions???
This is a client database. I have multiple tables with all information connected with Client ID's and relationships.
I need to be able to click a button on the form and view and/or print a report for only the record being viewed at that time. I do not want to ask the user to enter the Client ID in a dialog box, I want it to be more streamlined then that.
I have tried coding the command button as follows:
Dim stDocName As String
Dim strWhere As String
stDocName = "rptOneRecord"
stWhere = "[Client ID]=" & Me!ClientID
DoCmd.OpenReport stDocName, acPreview, , strWhere
And the report does open, but without any infomation on it whatsoever.
Any suggestions???
Last edited: