Refresh Listbox in Subform

C

Christoph Schulz

Hi!

does someone know the trick to refresh a listbox in a subform after the
event of navigating through the datasets of a parent form. I can now only
achieve this by clicking a requery button WITHIN the subform, I can not
force the requery from the superior form.

thanks in advance,
Christoph
 
S

Stuart McCall

Christoph Schulz said:
Hi!

does someone know the trick to refresh a listbox in a subform after the
event of navigating through the datasets of a parent form. I can now only
achieve this by clicking a requery button WITHIN the subform, I can not
force the requery from the superior form.

thanks in advance,
Christoph

Put this code in the parent form's OnCurrent event proc:

Me.SubformControlName.Form!ListboxName.ReQuery

(substituting your actual names, of course)
 
S

scubadiver

The following in the button on the main form I think should do it:

[forms]![form name]![subform].[forms]![subform name]![combo name].requery
 
C

Christoph Schulz

It works - in the OnCurrent-Event I did not go down the whole Foms Hierarchy
beginning from Me...
Thanks to both of you!

scubadiver said:
The following in the button on the main form I think should do it:

[forms]![form name]![subform].[forms]![subform name]![combo name].requery

Christoph Schulz said:
Hi!

does someone know the trick to refresh a listbox in a subform after the
event of navigating through the datasets of a parent form. I can now only
achieve this by clicking a requery button WITHIN the subform, I can not
force the requery from the superior form.

thanks in advance,
Christoph
 
K

KumbiaKid

Hi scubadiver,

Your post, combined with a post from Wayne-I-M, also helped me to sort a
problem I was having. See my post below, subject "Cascading prompts in a form
for a query".
Cheers,
KumbiaKid

scubadiver said:
The following in the button on the main form I think should do it:

[forms]![form name]![subform].[forms]![subform name]![combo name].requery

Christoph Schulz said:
Hi!

does someone know the trick to refresh a listbox in a subform after the
event of navigating through the datasets of a parent form. I can now only
achieve this by clicking a requery button WITHIN the subform, I can not
force the requery from the superior form.

thanks in advance,
Christoph
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top