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!

Dialog box to confirm or cancel print from a form...

Status
Not open for further replies.

MChancellor

Technical User
Jan 12, 2000
35
US
I'm working in MS Access 7.0, and I have a form that has command buttons to print the current record, to print all the records, or to close the form. What I would like to do is to pop up a dialog box when the &quot;print all records&quot; command button is pressed asking the user if they are SURE they want to print all the records. At this point I want them to be able to either say OK or CANCEL. I know there is a way to do this, but I'm not entirely sure what it is.<br>
<br>
Thanks for any help...<br>
M. Chancellor
 
Use the Message Box Function:<br>
<br>
Dim iResp as Integer<br>
<br>
intResp = Msgbox(&quot;Are you sure&quot;, 4+16+256)<br>
<br>
if iResp = vbNo then Exit Sub<br>
<br>
If you look at the help you can replace the 4+16+256 bit with nice vb constants. You can also define your own dialogue box title too. <br>
<br>
WP <p>Bill Paton<br><a href=mailto:wpaton@neptune400.co.uk>wpaton@neptune400.co.uk</a><br><a href=
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top