PLS HELP: Searching for Null in Recordset with do loop

oltroman

Registered User.
Local time
Tomorrow, 05:56
Joined
May 8, 2012
Messages
18
Hi,

I want to find empty field (Null/ "") but did'nt work. When I tried this code with for example "t", and put "t" in the field, the code does work. Here's the code,

Code:
Set RstInv = dbInv.OpenRecordset("DateRecord")

Counter = 4
With RstInv
    .GetRows ([StrBarcode])
    .MovePrevious
    
'Need change ################################################################
    Do Until .Fields(Counter).Value = Null '<---  NO ERROR BUT CAN'T FIND NULL

        Counter = Counter + 1
        MsgBox Counter
    Loop
'Need change ################################################################
    
    .Edit
    .Fields(Counter).Value = Forms!IN_OUT.oInOut & Date
    .Update
End With

Can anybody helps. Thanks :D:D:D
 
To start *nothing* is ever = to Null, including Null. Null is undefined.
Two suggestions:
1) Try using the IsNull() function
2) You need some mechinism to move between records like .MoveNext.
 
I've been doing something else these few days and put this on hold until today. I tried IsNull() function. work like a charm. Thanks rural Guys :D:D:D
 

Users who are viewing this thread

Back
Top Bottom