Click Checkbox then prompt

A

ant1983

Firstly i dont really code - bit of a novice so if anyone can help would
really appreciate it! :)

I have a form (frmBooking) with a checkbox (blnToBeBilled) and the form
which runs off a table (tblBooking).

Currently you can just click that checkbox but i want a box thing to pop up
asking:

"Are you sure you want to cancel this booking?" With two buttons: "Yes" and
"No".

If the user clicks "Yes" i want another form to come up with a field where
they can stipulate the reason so a free-text memo field. If they then type
stuff in there and click ok i want it to check that checkbox (blnToBeBilled)
and return to the form.

If they click No then i just want it to return to the form without the box
being clicked.

Where do i start? What do i do?

Thanks guyz!!

ant1983
 
A

Afrosheen via AccessMonster.com

I hope this gets you started.


Go to design view by right clicking on the form and select design view.
Click on the check box an right click on that and go to properties.
Go to the event tab and look for "OnClick"
Click in the box and select [event procedure]
In between the Private Sub and the End Select put this code

Select Case MsgBox("Are you sure you want to cancel this booking?", vbYesNo
Or vbExclamation Or vbDefaultButton1, Application.Name)

Case vbYes
DoCmd.RunCommand acCmdZoomBox
Case vbNo
Exit Sub
End Select




If you have a memo field in your tblBooking, when you click on the Yes button
it should open the memo field?

This is what they call air code {not tried} but possible. Opening the memo
box may not be correct. Let me know.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top