Combo Box help please

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created........
A table of contacts "tblContactDetails"
A Query "qryContactDetails"
A Query qryParameterSurname
A Report "rptQueryParameterSurname2"
A form with a 2 column ( First / Last Name) combo box in it "cboCantactNames"

Questions
1. I can anyone advise me how I get a contacts details report to be
displayed when I click on a contacts name in the drop down list in the combo
box.

2. Do I need to use VBA to do this, can you post a "commented" example
please that I could examine.

3. Any other tips relevant would be appreciated

Thanks
 
Build a query that uses the combo box as criteria --
[Forms]![YourFormName]![YourComboBox]

Use the query for record source for the report.

Build a macro that open the report.

In the property for the combo box - On Double Click put the macro. Open the
pull down and select the macro from the list.

Make your selection and then all you have to do is double click the combo
box to run the report.
 
Hi Karl,
Thanks for your reply.
I have tried what your suggested but don't get the results I expected.
Correct my error please.....
I built my query fro the record source (tblContacts)
In the "Surname Field" in the criteria field I entered
[Forms]![frmMyContacts]![combo7]
Created the open report macro and set the double click property as you
suggested.
What Happens now.......
A Enter Parameter Value Box opens with the text
"[Forms]![frmMyContacts]![combo7]" in it...........
exactly as it is typed.....I know this is wrong and must have entered the
criteria in the wrong place....can you explain what I might have done wrong?

I would like to include both the First and Second name Column to both
effect the relevant report to appear in the combo Box. (as I have several
contacts with the same surname)......not sure how I go about this either.

I hope I have explained my problem, well.
If you need further information let me know.
Thanks
Dermot





KARL DEWEY said:
Build a query that uses the combo box as criteria --
[Forms]![YourFormName]![YourComboBox]

Use the query for record source for the report.

Build a macro that open the report.

In the property for the combo box - On Double Click put the macro. Open the
pull down and select the macro from the list.

Make your selection and then all you have to do is double click the combo
box to run the report.

Dermot said:
I have created........
A table of contacts "tblContactDetails"
A Query "qryContactDetails"
A Query qryParameterSurname
A Report "rptQueryParameterSurname2"
A form with a 2 column ( First / Last Name) combo box in it "cboCantactNames"

Questions
1. I can anyone advise me how I get a contacts details report to be
displayed when I click on a contacts name in the drop down list in the combo
box.

2. Do I need to use VBA to do this, can you post a "commented" example
please that I could examine.

3. Any other tips relevant would be appreciated

Thanks
 
Thanks for the reply Allen.
Thanks for the interesting link too.
Is the code you supplied for the combo box?

I am also interested to know where I went wrong In the posting above when I
tied to do what Karl explained to me?
Can you explain to me where I went wrong?
Thanks
Dermot
 
Back
Top