Selection from combobox

jboyle

New member
Local time
Today, 19:18
Joined
Nov 18, 2000
Messages
53
I have a database with a field called classification. There are only two entries for this field, CAR or TRUCK. I have a form for selecting the criteria to print. There is a combobox with the two options of CAR or TRUCK. The user can select either of the two and the report filters the table and generates a report based on the selection. How do I let the report generate CARS and TRUCKS? To this point I can only do a report of either a car or a truck, not both combined.
Thanks for your help - John
 
For the Car -> Cars and Truck -> Trucks, make the following mods to the properties of your Combobox on the report:

ON THE DATA TAB:
Control Source= Classification
Row Source Type= Value List
Row Source= "car";"Cars";"Truck";"Trucks"
Bound Column= 1

ON THE FORMAT TAB:
Column Count= 2
Column Widths= 0";1"

What this does is creates a second column with the values Cars & Trucks. The control is still bound to the first column (Car & Truck) but the first column is hidden b/c it's width is set to 0".

As far as displaying a report with both Cars and trucks, open your report in Design View. Use VIEW menu -> SORTING & GROUPING screen to set a GROUP based on Classification. Turn on the Group Header. This will group all records with a Car classification together and then all records with a Truck classifiaction together. (The report will need to have a record source with both cars and trucks for this work obviously.) If you put the Classification combobox we just modified in the Classification Header section of the report, each group will be labelled Cars or Trucks.

Hope this makes sense!

js
 

Users who are viewing this thread

Back
Top Bottom