Open a Report From a Combo Box

trackmedic

Registered User.
Local time
Today, 13:24
Joined
Aug 20, 2001
Messages
115
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:)
 
[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
 
Nope, that did not work.

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'
 
Tried a different way

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:
 
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
 
No Prolbem

Access 97,

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

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

Hope it helps

Hay
 

Attachments

Hi, I have a very similar question to trackmedic's. I am using the latest version of Access and am new to Access. I'm not sure how trackmedic's is, but I have a table that I pull from SQL. From this table I create reports for every customer. Because the reports aren't all straight forward, most of the reports are created from a query I made based off of the table. So I was wondering, if I still use [Forms]![MyFormName]![MyComboName] somewhere?

Also, my customers are identified by a certain number, but to make it user friendly, I want the name to be the option of choice rather than the number.

Thanks for the help in advance
 
Also, Haley, I couldn't open your sample so that didn't help
 

Users who are viewing this thread

Back
Top Bottom