Problems pulling data from subform via vb...

alex_aqui

Registered User.
Local time
Today, 16:45
Joined
Nov 4, 2002
Messages
12
I have an unbound field on a form which has a subform that is linked to it. The subform is based on a non-updateable query, which means that if there is no match, the subform does not show up. My problem is that I am referencing some of the fields from the subform for calculation purposes for error checking in a function in VBA. What is the VB code that checks to see if there is any data in the form or how would I check to see if there is no underlying records in the subform? Obviously, if I reference fields that are not there for that record, it will crash. I just don't know how to check for this case and get around it.

Thanks in advance.
 
If RecordsetClone.RecordCount = 0 Then
or If Not IsNumeric([SomeField]) Then etc
 

Users who are viewing this thread

Back
Top Bottom