View Full Version : If... empty fields give MsgBox?


voskouee
03-13-2007, 11:20 PM
I have a table and i want to add a control that will give me a message box if there is an empty field.
i am running a process that fills a table.. after this is finished i want to add this control?

can i indicate which lines are empty?

any ideas? if i run an sql from vba for is null then what?

vba entirely?

please help!

Dennisk
03-14-2007, 03:12 AM
in the forms on current event use something like this.

If isnull(me!yourControl) then
msgbox "your message"
endif

voskouee
03-14-2007, 03:50 AM
i dont have any forms... its the table i want to search for empty fields.....

Dennisk
03-14-2007, 03:56 AM
select * from mytable where mycontrol is null

note the sublte difference in queries use is null, in code use isnull()

or if the data has been entered and then cleared out use the len function instead
select * from mytable where LEN(mycontrol)>0