Requery Problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All
I wonder why this code :
Private Sub Form_Click()
Forms!Frmsearch!TBL7SF1.Requery
End Sub
about Requery a subform is working perfectly in 2007 version environment
but it isnot working in 2003 environment
- My database formatted in 2003 version
- in my form(Frmsearch) I have two subform separately and with click on each
displayed record in first one, related records should display in second
subform
 
bijan said:
Hi All
I wonder why this code :
Private Sub Form_Click()
Forms!Frmsearch!TBL7SF1.Requery
End Sub
about Requery a subform is working perfectly in 2007 version
environment but it isnot working in 2003 environment
- My database formatted in 2003 version
- in my form(Frmsearch) I have two subform separately and with click
on each displayed record in first one, related records should
display in second subform

Some versions are perhaps more restrictive or sensitive with regards to
syntax.

When addressing subform properties and methods, I think, the Form
keyword is sometimes required

Forms!Frmsearch!TBL7SF1.Form.Requery

This is, if TBL7SF1 is really the subform *control* name (which may
differ from the name of the form, as viewed in the database window)

Some more info here
http://support.microsoft.com/?kbid=209099
 
Thank you Roy
As you said in 2003 envieronment I needed to add ".Form" behind my subform
and this address must be changed both in Form_click and it's subform query
criteria in record source.
Bijan
 
Back
Top