H
hermanko
Hi,
I have a form, which contains a subform. Both the form and subform
display different query results... both originating from the same
table.
upon clicking a cmd button, I would like, thru code, to check that a
particular field, call it [LastName] is NOT null in any records. That
is, if the user has accidentally deleted any info in the [LastName]
field and clicks that button, a msgbox should display saying that field
cannot be null.
Currently I have this:
If IsNull(Me![LastName]) Or IsNull(Me![Version
History].Form.[LastName]) Then
....
where [Version History] is my subform control name.
The above line doesn't always work because it seems when i test it by
deleting info in the [LastName] field for one record, then put the
cursor in another record, then click the button, it seems to only check
that the current record with focus is OK (i.e. not NULL) and so no msg
appears even tho the record i just moved off of now has a null
[LastName] field.
I hope my problem was explained clearly. Hope someone can help me out.
Herman
I have a form, which contains a subform. Both the form and subform
display different query results... both originating from the same
table.
upon clicking a cmd button, I would like, thru code, to check that a
particular field, call it [LastName] is NOT null in any records. That
is, if the user has accidentally deleted any info in the [LastName]
field and clicks that button, a msgbox should display saying that field
cannot be null.
Currently I have this:
If IsNull(Me![LastName]) Or IsNull(Me![Version
History].Form.[LastName]) Then
....
where [Version History] is my subform control name.
The above line doesn't always work because it seems when i test it by
deleting info in the [LastName] field for one record, then put the
cursor in another record, then click the button, it seems to only check
that the current record with focus is OK (i.e. not NULL) and so no msg
appears even tho the record i just moved off of now has a null
[LastName] field.
I hope my problem was explained clearly. Hope someone can help me out.
Herman