K
kswinth
Guest
I'm sure there is an easy solution to this one, but I have a terrible time passing data from one table/query/form to another, so I'm hoping someone can help me out.
Currently, I have a form (called GroupReservations) with a combobox that list the first name, last name, and agency that someone is from. The first column is bound to AgentID and the combobox pulls from a query called [Contacts & Agents] (Agency name comes from the agents table and first and last name come from the contacts table). That info then fills in a bunch of other fields in my form -- which is all working fine.
Now, I want to allow users to add new agents or contacts if the agency or person they are looking for is not on the list, so I created a command button called NewAgent that opens up a form called "Maintain Agent List".
When users click the button, the other form opens and allows them to enter a new contact and/or agency. So far so good.
Here's the problem... How do I let my combobox know that it needs to requery (I guess) the "Contacts & Agents" query so that the new record shows on the list? If I close my form and reopen it, the new info is on the list in the combobox. But I can't get it to update automatically upon entering the record in the "Maintain Agent List" form.
Any assistance would be appreciated!
Kim
Currently, I have a form (called GroupReservations) with a combobox that list the first name, last name, and agency that someone is from. The first column is bound to AgentID and the combobox pulls from a query called [Contacts & Agents] (Agency name comes from the agents table and first and last name come from the contacts table). That info then fills in a bunch of other fields in my form -- which is all working fine.
Now, I want to allow users to add new agents or contacts if the agency or person they are looking for is not on the list, so I created a command button called NewAgent that opens up a form called "Maintain Agent List".
When users click the button, the other form opens and allows them to enter a new contact and/or agency. So far so good.
Here's the problem... How do I let my combobox know that it needs to requery (I guess) the "Contacts & Agents" query so that the new record shows on the list? If I close my form and reopen it, the new info is on the list in the combobox. But I can't get it to update automatically upon entering the record in the "Maintain Agent List" form.
Any assistance would be appreciated!
Kim