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 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