I'm Very New To Using VB in Access and I've come across an issue of not being able to override the on load event.
I'm in the process of creating a booking system where users must first create an account in a form (if no account exists already).
I have written a few lines of code into the OnLoad event to open a new blank form.
Once users have entered their personal information, the user then clicks on a "Next" button to enter credit card info in another form whilst also closing and saving the previous form.
On my second form i would like to have a "Back" button with an OnClick event that sends the user back to the previous form And most recent record instead of opening a new blank record again.
Is there any way to do this?
My code for the OnLoad event in the customer information form is as follows:
Currently the code i have written into the "Back" button on the credit card info form is as seen below;
The only solution i have found to eradicate this issue currently is by simplifying the process, not closing any of the forms in the OnClick event when travelling from one form to the other until the booking process is complete.
I'm in the process of creating a booking system where users must first create an account in a form (if no account exists already).
I have written a few lines of code into the OnLoad event to open a new blank form.
Once users have entered their personal information, the user then clicks on a "Next" button to enter credit card info in another form whilst also closing and saving the previous form.
On my second form i would like to have a "Back" button with an OnClick event that sends the user back to the previous form And most recent record instead of opening a new blank record again.
Is there any way to do this?
My code for the OnLoad event in the customer information form is as follows:
Code:
Private Sub Form_Load()
On Error Resume Next
DoCmd.GoToRecord , , acNewRec
End Sub
Currently the code i have written into the "Back" button on the credit card info form is as seen below;
Code:
Private Sub btnBackToCustInfo_Click()
On Error Resume Next
DoCmd.OpenForm "frmCreateAccountCust"
End Sub
The only solution i have found to eradicate this issue currently is by simplifying the process, not closing any of the forms in the OnClick event when travelling from one form to the other until the booking process is complete.