Hello vbforums.com,
I am trying to print only the current data from a form in access. Includes data from a subform.
Ive done it before and am actually using the same code.. with no success. Maybe someone can help...
The report to be called is name Patient
I want to print only current PatID ... but its not working as i said.
I use the following code.
VB Code:
Dim strDocName As String Dim strWhere As String strWhere = "[PatID]=" & Me.PatID strDocName = "Patient" DoCmd.OpenReport strDocName, acPreview, , strWhere
It keeps asking me for the PatID.... even though it is plainly displayed on the form.
Also with some changes tells me i have to many (
Heeeelp....![]()
I attatched a file.




Reply With Quote