Refreshing a dropdown box

  • Thread starter Thread starter evilcowstare
  • Start date Start date
E

evilcowstare

Hi I have a form ( say FORM 1 )with a few drop down boxes on it.

The boxes get their field from a table via a query.

I have a button on the FORM 1 that will open up another form (say ADD FORM)
to be able to add new fields into the table. This is a form that opens up
after FORM 1 has loaded. The problem I have at the moment is that when I
close ADD FORM they new fields are not visible in the drop-down box until I
close it and re open it.

So is there anyway in which when I click the exit button it will refresh just
the drop-down box with the new fields or do I need to reload the whole form
again?

If you can give me simple instructions it would be appreciated, im a bit of a
novice.
Thank You
 
Do you want to ADD NEW FIELDS to a table or ADD NEW DATA?


Hi I have a form ( say FORM 1 )with a few drop down boxes on it.

The boxes get their field from a table via a query.

I have a button on the FORM 1 that will open up another form (say ADD FORM)
to be able to add new fields into the table. This is a form that opens up
after FORM 1 has loaded. The problem I have at the moment is that when I
close ADD FORM they new fields are not visible in the drop-down box until I
close it and re open it.

So is there anyway in which when I click the exit button it will refresh just
the drop-down box with the new fields or do I need to reload the whole form
again?

If you can give me simple instructions it would be appreciated, im a bit of a
novice.
Thank You

--
Ruel Cespedes
Sr. Programmer Analyst
(e-mail address removed)

Message posted via AccessMonster.com
 
In the combobox properties window go to Event>>On Got Focus. Hit the ...
button and choose build code. Enter the line Me!ComboXX.Requery where XX is
the actual combo number. Should look like this.

Private Sub Combo24_GotFocus()
Me![Combo24].Requery
End Sub

Does that solve it?
 

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

Back
Top