PDA

Click to See Complete Forum and Search --> : find a record with a variant field which is not null


xmin
Sep 27th, 2000, 06:57 PM
Hi, Could anyone tell me, with DAO351, how to find a record with a variant field which is not Null?
Thanks.
-- IHailJoe

simonm
Sep 28th, 2000, 07:31 AM
I'm not sure what you mean there 'xmin'.

Field data types cannot be variant in Access.

Could you explain further?

xmin
Sep 28th, 2000, 10:06 AM
I¡¯m sorry, simonm. I made a mistake. That should be a Text field. I have been trying to use the Findfirst method (as follows) to locate a record with that field and failed.

.FindFirst Not IsNull(!FieldName) ¡®Return: This object doesn¡¯t support such automation
¡®Or
.FindFirst ¡°FieldName <> Null¡±

Perhaps I just don¡¯t know how to use the method. What should I do?

simonm
Sep 28th, 2000, 10:48 AM
I see what you are trying to do.

Yes, you are using the 'FindFirst' method incorrectly.

Use it like this:

.FindFirst "[FieldName] IS NOT NULL"

The criteria parameter of this method is a string that is structured like a WHERE clause of an SQL query.

xmin
Sep 28th, 2000, 11:55 AM
Thank you, simonm. I'll try it.