Getting a button to tick a box

Esjaye

Registered User.
Local time
Today, 23:04
Joined
Aug 1, 2018
Messages
22
Hi,

I have a button with this event procedure behind it (i didnt write it i just imported from access 95) when you pressed this button - along with opening up the report which it still does it used to tick the box in the related table to say it had been done but now it is in access 365 it doesnt - any ideas?


Private Sub Do_Confirm_Click()
On Error GoTo Err_Do_Confirm_Click

Dim stDocName As String
Dim Crit As String
Dim ret

If Me![Order Status] > 1 Then
ret = MsgBox("A confimation order may have already been sent. Would you still like to print?", 4 + 64 + 0, "Print Again?")
If ret = 7 Then
Exit Sub
End If
End If
ret = MsgBox("Would you like to show pictures?", 4 + 64 + 0, "Show Pictures?")
If ret = 7 Then
stDocName = "Order Confirmation Report (No Pictures)"
Else
stDocName = "Order Confirmation Report"
End If
'Me.Refresh

Crit = "[Order Header Table]![Order Number] ='" & Me![Order Number] & "'"

DoCmd.OpenReport stDocName, acPreview
If ret = 7 Then
Reports![Order Confirmation Report (No Pictures)].Filter = Crit
DoCmd.Maximize
Else
Reports![Order Confirmation Report].Filter = Crit
DoCmd.Maximize
End If


Exit_Do_Confirm_Click:
Exit Sub

Err_Do_Confirm_Click:
MsgBox Err.Description
Resume Exit_Do_Confirm_Click

End Sub
 
I cannot see any code that would update a table?
 
I don't see any code to update a table.

BTW I don't know if you can remember what 4+64+0 means, but I find that vbYesNo+vbInformation is much clearer. Similarly vbNo is easier to understand than 7.
 

Users who are viewing this thread

Back
Top Bottom