The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
The only problem is that once you press the exit database button it closes it straight away!
I want to create a nice little message box to ask whether you are sure you want to quit, I havn't got a clue howto do this and Access help is a pile of crap!
It's got to be an 'OK' or 'Cancel' box which is '1' or vbOKCancel...
Can someone either tell me how to assign a message box like that to a button or just upload a basic form with one button that does what I want so that I can see how it works...
I'm sure I'll find out somehow someday but I know someone here will be able to help me better and prevent me from ~buggering~ up my database... again...
Thanks!
It's so simple once you think about it!
Book_Appointment_Click
End If
Private Sub Cmd_Btn_Off_Click()
If MsgBox("Are you sure your gay?", vbYesNo, "!") = vbYes Then
CloseForm 'Calls the CloseForm function
End If
End Sub
Private Sub CloseForm()
DoCmd.Close
End Sub
The code is below:
If clicked = vbRetry Then
Call Book_Appointment
I don't know how to do that!
Are you around tomorrow during the day? Got an email address? I can be on Messenger during the day.
Grrrrrr!
if clicked = vbRetry then
Book_Appointment_Click() 'or is it: call Book_Appointment_Click() ?
Where does the stLinkCriteria get assigned values?
A basic one this time..
How do I call up the sub again if the retry button is clicked?
Look at the line that I have indicated, could someone help me please?
Thanks!
---------
Private Sub Book_Appointment_Click()
On Error GoTo Err_Book_Appointment
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Book Appointment"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Book_Appointment:
Exit Sub
Err_Book_Appointment:
MsgBox "Enter the correct details for the search to work!", vbRetryCancel + vbExclamation, "Retry or Cancel?"
'If clicked = vbRetry Then GoTo Book_Appointment
*****ABOVE LINE IS THE ONE THAT NEEDS WORK!*****
Resume Exit_Book_Appointment
End Sub