requery command (1 Viewer)

kgcrowther

Registered User.
Local time
Today, 15:16
Joined
Jun 1, 2001
Messages
52
This is the same question as ezpc's below. I have a combobox and from there you choose an instrument type from a combobox. There's a button, which opens a form to add the instrument to the list if needed.

When the instrument is added to the list I need to requery all the comboboxes in the form. (because many of them involve items from the list) Or someone requery or refresh the whole form.

What is the easiest way to set this up?
 

charityg

Registered User.
Local time
Today, 15:16
Joined
Apr 17, 2001
Messages
634
dim ctl as control

for each ctl in me.controls
if ctl.controltype=accombobox then
ctl.requery
endif
next ctl
 

kgcrowther

Registered User.
Local time
Today, 15:16
Joined
Jun 1, 2001
Messages
52
Hey thanks!

I put it in the On GotFocus event so that everytime the form gets the focus back it requeries everything.

It works great. I really appreciate your help!

Kenneth
 

Users who are viewing this thread

Top Bottom