Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

combox and subform search form

Status
Not open for further replies.

pinkpoppy

Programmer
Jul 6, 2011
75
US
Hello,

I have a search form. The search form has a combobox and a subform. When a user selects from the combobox (they select a supplier code), the subform will display the the searched results.

In the subform, users are allow to add new records. When the user add a new record, the supplier code (that was selected from the combobox) will automatically input the same code into the new record.

How can I stop this from happening? the user can add a new record but the supplier code does not have to be the same as the combobox selection.

any help or suggestion is very much appreciated!
 
I am assuming you used an unbound combobox and a subform linked to the value in the combobox. If that is so then the subform will automatically populate new records. No way to stop that, you would have to modify what you are doing. The only way to change this would be not to link the subform the the combobox. You then have to write code on the after update event of the combobox to do your search. You can modify the query of the subform to do the filtering or use the filter method of the subform and apply a filter.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top