Subform Question

T

TH

Hi,

How do you get a combo box in a subform to show an updated list of what's in
the field? I have a person selecting a value from the combo box (of course)
and when the item they want to enter is not on the list they click a combo
button and enter the desired item on a pop form. When the person is done
entering the information, I want the subform to reflect the change (the new
item they entered). I've tried using "Requery" in a macro but it doesn't
work.

Any help would be appreciated.

Thanks

Tonye
 
K

Ken Snell

Requery is the correct action to use, but how you use it depends upon when
you try to use it. And it depends somewhat on which version of ACCESS you're
using (ACCESS 2000 is less flexible than ACCESS 2002).

Please provide more info about your operation and setup.
 
T

TH

I am using Access 97. I have a person selecting a value from the combo box
(of course)
and when the item they want to enter is not on the list they click a command
button and enter the desired item on a pop form. When the person is done
entering the information, I want the subform to reflect the change (the new
item they entered). I am the same person who asked about subforms on the
form list.

Thanks for your help.

Tonye
 
T

TH

I've tried using "Requery" in a macro but it doesn't
work. I'm not sure what I'm doing wrong.

Tonye
 
K

Ken Snell

I have not worked with A97, so I cannot speak with any certainty as to how
macros work there for requery.

I do know that A2000 allows a macro to requery a subform's recordsource, but
I've had difficulty with requerying a control on that subform unless I first
set focus to the subform control (the control that holds the subform) and
then do the requery on the control in the subform.

Is the command button on the subform? Or on the mainform?
 
T

TH

The command button to enter new information is on the subform. I'll try
setting the focus to the subform control and let you know. Thanks for all
your help.

Tonye
 
K

Ken Snell

If the command button is in the subform, then the focus is already on the
subform and you shouldn't need to set it there again.

How are you referencing the Requery's Control Name argument?
 
T

TH

I've tried Requery with no arguments and I've tried it with the name of the
control I want to requery (without the Forms! identifier).

Tonye
 
T

TH

I have it figured out. For one thing, I didn't name the combo box after I
ran the wizard to put it on the subform (duh :( ). Also, I needed to put
the name of the control without the [ ] .

Thanks.

Tonye
 

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