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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check for null value in a form field

Status
Not open for further replies.

RDS2

Technical User
Jun 6, 2003
44
US
I have a form with a bound OLE object field on it. The object is created (an Excel worksheet) with a double click event attached to a command button on the form. What I need is a method to cancel (or at least get a confirmation that this is what the user wants) the re-creation of the worksheet in cases where one already exists.

I've tried something similar to:

IF me.Controls.Item("OLEBound25") IS NOT NULL Then....

This code bombs when run.
 
Hello

You want to use the ISNULL function to do this. For instance,

IF ISNull(txtMyTextBoxControl) THEN BEEP.
'
The complement of this would be:

IF NOT(ISNULL(txtMyTextBoxControl)) THEN BEEP
'
Search online help for more information

Regards
Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top