Requery subform

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

Guest

How would you requery a subform from a main form? I think I'm having trouble
with the syntax of referring to it. I have:

[Forms]![sbfPurchaseOrdersSubform].Requery

This doesn't seem to do it. Can anyone help?

Thank in advance
 
You want to requery the form that is the source object, not requery the
subform control:

[Forms]![sbfPurchaseOrdersSubform].Form.Requery
 
I get the error:

Run-time error '2465':

Microsoft Access can't find the field 'sbfPurchaseOrdersSubform'
referred to in your expression.


TomU said:
Try this:
Me![sbfPurchaseOrdersSubform].Form.Requery

TomU


Glenn Suggs said:
How would you requery a subform from a main form? I think I'm having trouble
with the syntax of referring to it. I have:

[Forms]![sbfPurchaseOrdersSubform].Requery

This doesn't seem to do it. Can anyone help?

Thank in advance
 
I get the error:

Run-time error '2450':

Microsoft Access can't find the form 'sbfPurchaseOrdersSubform'
referred to in a macro expression or Visual Basic code.


Ken Snell said:
You want to requery the form that is the source object, not requery the
subform control:

[Forms]![sbfPurchaseOrdersSubform].Form.Requery

--

Ken Snell
<MS ACCESS MVP>


Glenn Suggs said:
How would you requery a subform from a main form? I think I'm having
trouble
with the syntax of referring to it. I have:

[Forms]![sbfPurchaseOrdersSubform].Requery

This doesn't seem to do it. Can anyone help?

Thank in advance
 
Then I'm guessing that sbfPurchaseOrdersSubform is the name of the form that
you're using as the subform, not the name of the subform control on the main
form that holds the subform. In other words, sbfPurchaseOrdersSubform likely
is the SourceObject of the subform control. You want to use the name of the
subform control. Click on the top edge of the subform control, open
Properties window, and click Other tab. You'll see the name of the control
in the first line.

--

Ken Snell
<MS ACCESS MVP>



Glenn Suggs said:
I get the error:

Run-time error '2450':

Microsoft Access can't find the form 'sbfPurchaseOrdersSubform'
referred to in a macro expression or Visual Basic code.


Ken Snell said:
You want to requery the form that is the source object, not requery the
subform control:

[Forms]![sbfPurchaseOrdersSubform].Form.Requery

--

Ken Snell
<MS ACCESS MVP>


Glenn Suggs said:
How would you requery a subform from a main form? I think I'm having
trouble
with the syntax of referring to it. I have:

[Forms]![sbfPurchaseOrdersSubform].Requery

This doesn't seem to do it. Can anyone help?

Thank in advance
 
Back
Top