Hi Guys, Newbie again, with a small thing.. I have a payment command button on my form and when pressed this prints a report, when printed is there a way to update my Paid field to Yes?
The Code;
Private Sub Docket_payment_Click()
'Attached to On Click event of Docket_Payment
Dim strPasswd
strPasswd = InputBox("Enter Password", "Restricted Form")
'Check to see if there is any entry made to input box, or if
'cancel button is pressed. If no entry made then exit sub.
If strPasswd = "" Or strPasswd = Empty Then
MsgBox "No Input Provided", vbInformation, "Required Data"
Exit Sub
End If
'If correct password is entered print preview Payment report
'If incorrect password entered give message and exit sub
If strPasswd = "154" Then
Dim strDocName As String
Dim strWhere As String
strDocName = "Payment"
strWhere = "[Docket_Number]=" & Me!Docket_Number
DoCmd.OpenReport strDocName, acPreview, , strWhere
Else
MsgBox "Sorry, you do not have access to this form", _
vbOKOnly, "Important Information"
Exit Sub
End If
End Sub
The Code;
Private Sub Docket_payment_Click()
'Attached to On Click event of Docket_Payment
Dim strPasswd
strPasswd = InputBox("Enter Password", "Restricted Form")
'Check to see if there is any entry made to input box, or if
'cancel button is pressed. If no entry made then exit sub.
If strPasswd = "" Or strPasswd = Empty Then
MsgBox "No Input Provided", vbInformation, "Required Data"
Exit Sub
End If
'If correct password is entered print preview Payment report
'If incorrect password entered give message and exit sub
If strPasswd = "154" Then
Dim strDocName As String
Dim strWhere As String
strDocName = "Payment"
strWhere = "[Docket_Number]=" & Me!Docket_Number
DoCmd.OpenReport strDocName, acPreview, , strWhere
Else
MsgBox "Sorry, you do not have access to this form", _
vbOKOnly, "Important Information"
Exit Sub
End If
End Sub