Requery a list in aanother form ?

  • Thread starter Thread starter kelvin H via AccessMonster.com
  • Start date Start date
K

kelvin H via AccessMonster.com

Is it possible to Requery the result of list which is in another form ?

Thanks
 
kelvin said:
Is it possible to Requery the result of list which is in another form ?


Sure, as long as the other form is open, just reference the
object that you want to operate on. If it's another form,
use something like:
Forms!otherform.Requery

If it's a list/combo box control:
Forms!otherform.the control.Requery
 
Marshall Barton said:
Sure, as long as the other form is open, just reference the
object that you want to operate on. If it's another form,
use something like:
Forms!otherform.Requery

If it's a list/combo box control:
Forms!otherform.the control.Requery

If that doesn't work, you may want to try something like

Forms!otherform.Controls("the control").Requery

Or

Me.tableName_Subform.Controls("the control").Requery

I found recently that this was the only way I could get it to work for me.

HTH;

Amy
 
Amy said:
If that doesn't work, you may want to try something like

Forms!otherform.Controls("the control").Requery
Or
Me.tableName_Subform.Controls("the control").Requery

I found recently that this was the only way I could get it to work for me.

Amy, FYI,
The syntax:
Forms!otherform.Controls("the control").Requery
is equivalent to:
Forms!otherform.[the control].Requery
and the square brackets are only needed when the control
name contains a non-alphanumeric character (e.g. a space).

The subform control reference should include the Form
property to refer to the form object displayed in the
subform control (it doesn't always work without it).
For the subform itself:
Me.subformcontrol.Form.Requery
and for a control on the subform:
Me.subformcontrol.Form.[the control].Requery
 
Marshall Barton said:
Amy said:
If that doesn't work, you may want to try something like

Forms!otherform.Controls("the control").Requery
Or
Me.tableName_Subform.Controls("the control").Requery

I found recently that this was the only way I could get it to work for me.

Amy, FYI,
The syntax:
Forms!otherform.Controls("the control").Requery
is equivalent to:
Forms!otherform.[the control].Requery
and the square brackets are only needed when the control
name contains a non-alphanumeric character (e.g. a space).

That may be so, but my experience was that one worked and one didn't :-).

-Amy
 
Back
Top