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!

stop system message appearing

Status
Not open for further replies.

tizwaz

Technical User
Aug 8, 2002
437
GB
I have put the following code on the on click event of a button However although my msg box appears it is still followed by a system msg 'the action or method requires a report name argument'. How can I stop this appearing?

If IsNull(Me.cboReportType) Then
MsgBox "You must select the report type"
DoCmd.SetWarnings False
Me.cboReportType.SetFocus
End If
 
Add Exit Sub after the SetFocus call.

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

Part and Inventory Search

Sponsor

Back
Top