How to stop subform from creating a blank line

JeffreyDavid

Registered User.
Local time
Today, 19:25
Joined
Dec 23, 2003
Messages
63
I have a form with a subform, if the form is opened and closed with no data input, it creates a blank line in the table. Over an extended period of time, that table will be mess.
How would one go about stopping a subform from creating a blank line in the table?
 
this is not a normal event. What's going on in your FORM OPEN event for the sub-form.
 
Kodo said:
this is not a normal event. What's going on in your FORM OPEN event for the sub-form.
There is nothing in the FormOpen event of the subform. My subform does have 3 cascading text boxes. In the BeforeUpdate event, I have
If IsNull(Me.ProjectNo) = "" Then
Cancel = True
End If
But when I close the form with nothing done to anything, I get an error saying 'Type Mismatch' and it refers to line:
If IsNull(Me.ProjectNo) = "" Then

So I don't know...
 
If IsNull(Me.ProjectNo) = "" Then


that is not valid.

you either do

IF ISNULL(ME.PROJECTNO) THEN


or

IF ME.PROJECTNO="" THEN

but not both at the same time.
 

Users who are viewing this thread

Back
Top Bottom