I have a table (id, Name, Surname, Address etc.). All the fields (except id) can be NULL. I want to make a form where I can find all the records that have at least a NULL field. I have made a query (with the query designer) and then I "linked" a continuous form to it.
In the Detail part of the form I put a textbox ID (linked to the query) so I can have all the IDs that have at least a field NULL. So far so good, it works.
I would like to inform the user, after the ID, which fields are blank. So I put another textbox (named txt) and making controls like If isNull(Me.Name) then Me.txt.Value ="Name field is blank". It works perfectly but only for the first record. All the other records have the same message in the textbox txt.
The code is like this (of course stringW and lngth are declared)
If IsNull(Me.Name.Value) Then
stringW = stringW & " Name field,"
End If
..... (the same for Surname, Tel number etc)
lngth = Len(stringW) - 1
stringW = Left$(stringW, lngth)
Me.txt.Value = stringW
It seems that the form loads (I put the code in the load section), it makes the controls once and then copies the content of the stringW in the txt textbox for every record.
How could I resolve it? I mean, how can I have a textbox in the continuous form that changes its' contents informing the user for the blank fields of the record?