Combo query refresh

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
 
R

ruralguy via AccessMonster.com

Response = acDataErrAdded causes the ComboBox to requery for new entries.
 
J

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
 
J

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
 
R

ruralguy via AccessMonster.com

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]
 
J

Joskin

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]
 

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