PDA

View Full Version : loop through form(dataseetview)



Trevor
03-14-2008, 02:34 PM
I have a form{form1] and a textbox[calltype] and i need to loop through it occlose event to check if 1 of the values is "N/A and if no N/A value is found then msgbox "no n/a value"

I stupidly tried an rstloop on the actual table it would update and as you could guess it did't work
I may be wrong but here is what I have for a start and I think i'm stuck

for each calltype in form1
do until .EOF
calltype <> "N/A"
loop
end for
if valuenotfound then msgbox "no N/A value found"
end sub

OBP
03-16-2008, 10:17 AM
Trevor, you should be working with a Record Set or the Current Record in the Form.
Which Field(s) should have the value N/A?

Trevor
03-16-2008, 02:26 PM
CallType should have 1 N/A value,
The datasheet will update the table, so it wouldn't do me anygood to loop though the table since if i loop through the table rst , and the value N/A is there it could have been removed though the datasheet form