View Full Version : Open a Report From a Combo Box


trackmedic
08-18-2002, 01:30 PM
Hi,

I have a report that shows information on oil wells. This report is generated by a query called "print report by well". when I run the query from a button on a form. It opens a criteria box to input a well number. Thus, generating the report by well number. We have 145 oil wells in our area and I would like to make this as user friendly as I can for my employees. What I would like to do is use a combo box that shows the well numbers. When a well number is chosen, it would pull up a report in print preview of the latest information on the specific well from the query.

I have been beating my head on this one. PLEASE HELP !!!!!!

I'm sorta new at Access, please be patient !!!!

Thanks in advance.

Trackmedic:)

Rich
08-18-2002, 03:07 PM
[Forms]![MyFormName]![MyComboName] in the criteria section for the oil well number in your query. Where the combo box is displaying the oil well numbers

trackmedic
08-19-2002, 06:00 AM
I tried as you said. But it did not work. What happens is that I have the combo box listing all the well numbers. As I choose one, the query starts running and a criteria box still comes up. I would like the query to choose all records associated with the well number I choose sorted by that well number. i would like this to run as I choose the well number from the combo box and skip the criteria entry box.


Thanks

Andre'

trackmedic
08-20-2002, 04:18 AM
Hi,

i put the string as you described in my SQL statement on the combo box. This is what I have so far. I see the combo box, In it, is the list of wells. I choose a well and all I get is a report with the first well in the query with all of the information entries for all of the wells.:confused:

Hayley Baxter
08-20-2002, 04:23 AM
Andre

Sorry I have not got back to you regarding this I have been rather busy of late which version of access are you using?

Hay

trackmedic
08-20-2002, 04:31 AM
Access 97,

we are switching to office 2000 in about 6 months. We are always about 6 months behind the world.

Hayley Baxter
08-20-2002, 04:36 AM
Andre

Have a look at this I've converted it to A97 for you.

Hope it helps

Hay