This discussion is now closed.
Scroll to see replies
Private Sub add_Click()
Dim varAnswer As VbMsgBoxResult
Dim SQL As String
varAnswer = MsgBox("Do you wish to save these details?" & vbCrLf & vbCrLf & "Your account will be charged for the ride on accepting.", vbYesNo, "Thanks")
If varAnswer = vbNo Then
MsgBox "Please re-enter your details", vbOKOnly
Else
SQL = "UPDATE Members SET Members.[Account Balance] = Members.[Account Balance] - " & Me.RideCost & " WHERE Members.CustomerID = " & Me.Customer_ID
DoCmd.RunSQL SQL
MsgBox "Thank you for making your reservation." & vbCrLf & vbCrLf & "Your details have been saved; you will now be returned to the main menu.", vbOKOnly
DoCmd.Close acForm, "Reservation2", acSaveYes
End If
End Sub
Last reply 18 hours ago
Edexcel A Level Politics Paper 1 (9PL0 01) - 21st May 2024 [Exam Chat]10
Last reply 18 hours ago
Edexcel A Level Politics Paper 1 (9PL0 01) - 21st May 2024 [Exam Chat]10