Hello. I recently setup a database with a form that contains a command button to print a report (actually there are many command buttons tied to different reports.) All worked fine, so I moved the database to a different location on the network (not sure if this has anything to do with my problem, but I thought I'd make you aware of it) for others to begin using. Now, when I use the form to enter a new record, the reports do not populate with any data from the new record; however, if I pull up one of the older records (which I entered while testing the database and before I moved it) the reports populate with the data. It's like any new records entered are not pulling through to the reports. I need to be able to print the report with ONLY the current record shown on the form; not all records in the query. Also, I need to be able to print the report with the data right after it is entered into the form. The code tied to the command button is:
Private Sub VocSurvey_Click()
On Error GoTo Err_VocSurvey_Click
Dim strDocName As String
Dim strWhere As String
strDocName = "Vocational Survey"
strWhere = "[ClaimNumber]='" & Me!ClaimNumber & "'"
DoCmd.OpenReport strDocName, acNormal, , strWhere
Exit_VocSurvey_Click:
Exit Sub
Err_VocSurvey_Click:
MsgBox Err.Description
Resume Exit_VocSurvey_Click
End Sub
I appreciate any help or advice you can give me. Thank you.