if..then..else statement (silly question)

Davros

Registered User.
Local time
Today, 23:40
Joined
Sep 9, 2005
Messages
131
hi guys
sorry for the silly question but i'm banging my head at the moment

when i close a form i run a requery on another form. But if that other form is not open then i get an error massage.

Private Sub Form_Close()
Forms!memorial_search_results.Requery
End Sub

i have tried changing the above to an if..then..else statement but can't get it right

Private Sub Form_Close()
if Forms!memorial_search_results.open then
Forms!memorial_search_results.Requery
else
docmd.close
End Sub

Buth this does not work. what am i doing wrong??
 
thanks for the reply but the true statement does not work

any other ideas guys??

thanks
 
isloaded
exactley what i was looking for

cheers
 

Users who are viewing this thread

Back
Top Bottom