Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

beforeupdate : request confirmation

Status
Not open for further replies.

amigofd

Programmer
Jan 11, 2006
2
BE
Hello,

I have a form in access with a listbox. Here the user can select a client and that is linked to other information on the form.

But I need an alert "Are you sure?" when the user clicks on the listbox.

I was thinking of doing it like this:

result = MsgBox("are you sure ?",vbOkCancel,"confirmation")

if result = 1 then
'do nothing and continue
else
'prevent the form to be changed
end if

is this possible ?

thanks a lot !
Frank
 
You may try the BeforeUpdate event procedure of the listbox, playing with the Cancel argument.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top