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

Subform Empty - Dont run code on double-click

Status
Not open for further replies.

Krystoff

MIS
Sep 18, 2002
129
US
Hello all,

I have some code that runs on a subform from the SubForms On Dbl Click event. Runs fine when there is data in the subform.

If however there is no data at all in the subform I get an error based on what my code does (Tries to update another field with data from the row in the subform, gives me an invalid data error as there is no data)

How do I check to see if there is no data on a subform, so therefore don't run my code? I have tried:

If IsNull(Me.CustID) Then
MsgBox "There is no data"
Exit Sub
End if

But it skips right over that piece of code.

Any help is appreciated!

Chris
 
Syntax is wrong
use a Bang instead of a dot
Me!CustID


DougP, MCP
 
Thanks for the quick reply but that didn't do it either.

I have also tried

Me!CustID is null | Me.CustID is null

Anything else I should try?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top