GetDotted Domains

Viewing Thread:
"Microsoft Access or Visual Basic HELP!"

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.

Wed 04/12/02 at 17:53
Regular
Posts: 787
I've got a nice little database working, its a booking system and it all works!

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!
Wed 04/12/02 at 21:57
Regular
"Chavez, just hush.."
Posts: 11,080
So how would I go by putting that into the exit code?
Wed 04/12/02 at 21:36
Regular
""
Posts: 303
you mean something like...


clicked = MsgBox("Do you want to quit?", vbYesNo + vbExclamation, "Confirm")

If clicked = vbYes Then
MsgBox ("You clicked yes")
end
Else
MsgBox ("You clicked no")
End If
Wed 04/12/02 at 18:58
Regular
"Chavez, just hush.."
Posts: 11,080
The visual basic coding of the button is this:

Private Sub Exit_database_Click()
On Error GoTo Err_Exit_database_Click


DoCmd.Quit

Exit_Exit_database_Click:
Exit Sub

Err_Exit_database_Click:
MsgBox "Help!"
Resume Exit_Exit_database_Click

End Sub
Wed 04/12/02 at 17:53
Regular
"Chavez, just hush.."
Posts: 11,080
I've got a nice little database working, its a booking system and it all works!

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!

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Very pleased
Very pleased with the help given by your staff. They explained technical details in an easy way and were patient when providing information to a non expert like me.
Top-notch internet service
Excellent internet service and customer service. Top-notch in replying to my comments.
Duncan

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.