M
Michael Lam
I have created a form to allow user to keyin value
After click the save /Add records button , Autogen Ref No will be assigned
to this records
I want to create a buttons to print out current records only ? How ?
I have created a query to select the current records by Ref No
how can the new created Ref No pass value to the query ?
In the query wizard, there is a field called parameter or regulation
I have try to key in as follow
=[Form]![RequestForm]![RefNo]
am I correct?
THX
Michael Lam
I have created the code as below but dont work
Please comment
Private Sub Command47_Click()
On Error GoTo Err_Command47_Click
Dim rs As Object
Dim stDocName As String
stDocName = "RequestFormPrint"
rs = RequestFormQuery
DoCmd.OpenQuery rs, acNormal, acEdit
DoCmd.OpenReport stDocName, acPreview
Exit_Command47_Click:
Exit Sub
Err_Command47_Click:
MsgBox Err.Description
Resume Exit_Command47_Click
End Sub
Best regards
Michael
After click the save /Add records button , Autogen Ref No will be assigned
to this records
I want to create a buttons to print out current records only ? How ?
I have created a query to select the current records by Ref No
how can the new created Ref No pass value to the query ?
In the query wizard, there is a field called parameter or regulation
I have try to key in as follow
=[Form]![RequestForm]![RefNo]
am I correct?
THX
Michael Lam
I have created the code as below but dont work
Please comment
Private Sub Command47_Click()
On Error GoTo Err_Command47_Click
Dim rs As Object
Dim stDocName As String
stDocName = "RequestFormPrint"
rs = RequestFormQuery
DoCmd.OpenQuery rs, acNormal, acEdit
DoCmd.OpenReport stDocName, acPreview
Exit_Command47_Click:
Exit Sub
Err_Command47_Click:
MsgBox Err.Description
Resume Exit_Command47_Click
End Sub
Best regards
Michael