funkmonsteruk
IS-IT--Management
I've inherited a database which produces a report which is related to information which is added via a form which has a print button on it.
The report relates to a single record which will have most of it's details added by the user on this form.
The problem is that the report is failing to complete with data. I think the problem may be that the data being added to the form by the user is not being stored by the table prior to the report being printed (basically it seems as though the form is failing to refresh the data before printing the report).
The coding i'm using behind the print button is as follows
Private sub g2_click()
on error goto err_g2_click
dim stlinkcriteria as string
dim stdocname as string
stlinkcriteria = "[HistoryID]=" & Me![HistoryID]
stdocname = "Rpt_G2"
DoCmd.Openreport stdocname,, ,stLinkcriteria
Exit_g2_click:
exit sub
err_g2_click
msgbox Err.Description
Resume Exit_g2_click
End Sub
Can anyone suggest anything
The report relates to a single record which will have most of it's details added by the user on this form.
The problem is that the report is failing to complete with data. I think the problem may be that the data being added to the form by the user is not being stored by the table prior to the report being printed (basically it seems as though the form is failing to refresh the data before printing the report).
The coding i'm using behind the print button is as follows
Private sub g2_click()
on error goto err_g2_click
dim stlinkcriteria as string
dim stdocname as string
stlinkcriteria = "[HistoryID]=" & Me![HistoryID]
stdocname = "Rpt_G2"
DoCmd.Openreport stdocname,, ,stLinkcriteria
Exit_g2_click:
exit sub
err_g2_click
msgbox Err.Description
Resume Exit_g2_click
End Sub
Can anyone suggest anything