Combo query refresh

  • Thread starter Thread starter Joskin
  • Start date Start date
J

Joskin

Hello Guru's,



I have a database of animal records. Two of the tables are an "animal
table" and a "persons table".



When I create a new animal record, one of the fields is "breeder name" which
is selected by a combo box in the form, which offers a dropdown list from
the "persons table". If the breeders name isn't in the list, then it takes
you to the "person entry" form to enter the new breeder into the "persons
table" and then returns you to the "animal entry" form. It all works well.



The next box on the "animal entry" form is "owner name" which is derived in
the same way as the "breeder name" and works just as well.



However, if a new breeder is entered, when you return to the "animal entry"
form, the new person doesn't show in the next dropdown box ("owner name").
This is only a problem if the breeder & owner are the same person, but I
feel that it could be avoided if I knew how to "refresh" the query that
selects the data for the second dropdown box.



Any help, please?



TIA

Joskin
 
Response = acDataErrAdded causes the ComboBox to requery for new entries.
 
Thanks for your response ruralguy, but could you please be a bit more
explicit on how I use "Response = acDataErrAdded" ?
Treat me like an idiot & you won't go far wrong :-)

Joskin
 
Thanks for your response ruralguy, but could you please be a bit more
explicit on how I use "Response = acDataErrAdded" ?
Treat me like an idiot & you won't go far wrong :-)

Joskin
 
Me.ComboBoxName.Requery will cause a ComboBox to requery its RowSource.
Thanks for your response ruralguy, but could you please be a bit more
explicit on how I use "Response = acDataErrAdded" ?
Treat me like an idiot & you won't go far wrong :-)

Joskin
Response = acDataErrAdded causes the ComboBox to requery for new entries.
[quoted text clipped - 28 lines]
 
That's great - many thanks, RG.

Joskin

ruralguy via AccessMonster.com said:
Me.ComboBoxName.Requery will cause a ComboBox to requery its RowSource.
Thanks for your response ruralguy, but could you please be a bit more
explicit on how I use "Response = acDataErrAdded" ?
Treat me like an idiot & you won't go far wrong :-)

Joskin
Response = acDataErrAdded causes the ComboBox to requery for new
entries.
[quoted text clipped - 28 lines]

--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
 
Back
Top