Hello,
I am modifying a database that was created by someone else. The database has a form which a user can choose from a combobox and the result is then display in a subform.
Combobox1 has a query behind it. when the user clicks on it, it shows in the dropdown the available last,first name searchable information.
There is a form called "frmSubContact" which runs a query from 2 tables and it is a one to many relationship. This frmSubContact form is placed n the main form. But on the main form, this frmSubContact also runs a query to display data when the user selects from the combobox. The Link Master Field is bound to the combobox1 and the link child field is bound to 'last name'.
I've searched on how to export subform results to excel but the codes will export all of the query data from the frmSubContact, not the data that was selected from the combobox.
For example, frmSubContact has a total of 200 records. When I select the last name "Adams", the subform on the main form will display 3 records of the last name Adams. When I export, I only want to see in excel, the 3 Adam records. The excel just needs to pop up on the screen.
How can I export the results from the subform on the main form when a user selects from a combobox??
Any help or suggestions is much appreciated!
I am modifying a database that was created by someone else. The database has a form which a user can choose from a combobox and the result is then display in a subform.
Combobox1 has a query behind it. when the user clicks on it, it shows in the dropdown the available last,first name searchable information.
There is a form called "frmSubContact" which runs a query from 2 tables and it is a one to many relationship. This frmSubContact form is placed n the main form. But on the main form, this frmSubContact also runs a query to display data when the user selects from the combobox. The Link Master Field is bound to the combobox1 and the link child field is bound to 'last name'.
I've searched on how to export subform results to excel but the codes will export all of the query data from the frmSubContact, not the data that was selected from the combobox.
For example, frmSubContact has a total of 200 records. When I select the last name "Adams", the subform on the main form will display 3 records of the last name Adams. When I export, I only want to see in excel, the 3 Adam records. The excel just needs to pop up on the screen.
How can I export the results from the subform on the main form when a user selects from a combobox??
Any help or suggestions is much appreciated!