Need to Requery SubForm

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

Hi All,

I have an unbound field on a main form that provides the criteria for a
query parameter on the subform.

Using Requery does the job but it also returns the main form to the first
record and I have to then go back to the record I was working on.

Appreciate that I am probably using the wrong technique. Can anyone point me
in the right direction please.

Regards.
Bill.
 
Sounds like you are requerying the main form instead of the subform:

Me.[NameOfYourSubformControlHere].Form.Requery
 
Sorry - does this work with the after update event with unbound field on the
main form?

Allen Browne said:
Sounds like you are requerying the main form instead of the subform:

Me.[NameOfYourSubformControlHere].Form.Requery

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Bill said:
I have an unbound field on a main form that provides the criteria for a
query parameter on the subform.

Using Requery does the job but it also returns the main form to the first
record and I have to then go back to the record I was working on.

Appreciate that I am probably using the wrong technique. Can anyone point
me in the right direction please.
 
Sure. Give it a shot.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Bill said:
Sorry - does this work with the after update event with unbound field on
the main form?

Allen Browne said:
Sounds like you are requerying the main form instead of the subform:

Me.[NameOfYourSubformControlHere].Form.Requery

Bill said:
I have an unbound field on a main form that provides the criteria for a
query parameter on the subform.

Using Requery does the job but it also returns the main form to the
first record and I have to then go back to the record I was working on.

Appreciate that I am probably using the wrong technique. Can anyone
point me in the right direction please.
 
Allen,

In Me.[NameOfYourSubformControlHere].Form.Requery

The name of my subform control is simply [title] and it does work. Shouldn't
the full path to the control be entered?


Allen Browne said:
Sure. Give it a shot.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Bill said:
Sorry - does this work with the after update event with unbound field on
the main form?

Allen Browne said:
Sounds like you are requerying the main form instead of the subform:

Me.[NameOfYourSubformControlHere].Form.Requery


I have an unbound field on a main form that provides the criteria for a
query parameter on the subform.

Using Requery does the job but it also returns the main form to the
first record and I have to then go back to the record I was working on.

Appreciate that I am probably using the wrong technique. Can anyone
point me in the right direction please.
 
You can enter the full path if you prefer.

Or you can take advantage of "Me".

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Bill said:
Allen,

In Me.[NameOfYourSubformControlHere].Form.Requery

The name of my subform control is simply [title] and it does work.
Shouldn't the full path to the control be entered?


Allen Browne said:
Sure. Give it a shot.

Bill said:
Sorry - does this work with the after update event with unbound field on
the main form?

Sounds like you are requerying the main form instead of the subform:

Me.[NameOfYourSubformControlHere].Form.Requery


I have an unbound field on a main form that provides the criteria for
a query parameter on the subform.

Using Requery does the job but it also returns the main form to the
first record and I have to then go back to the record I was working
on.

Appreciate that I am probably using the wrong technique. Can anyone
point me in the right direction please.
 
Back
Top