very simple query not working....

cyberpac9

Registered User.
Local time
Today, 01:08
Joined
Jun 6, 2005
Messages
70
we have a main table for tracking pickups....some of the fields are combo boxes with relationships to other tables....one such relationship is units (ml, gallon, ounce, etc)...in the main table everything works just fine....a user enters the location info, the amount and the corresponding units. thus, an example would be a user picks up something from building X, room 101, 10, Gallons.....the 10 refers to the gallons, the user picked up 10 gallons...

now for the query:
i'm creating a query for which i will base a report on...in query design if i just select the above info everything works fine....it comes out on the report as 5 Gallons....however, what i'd like to do is concatenate the two fields so that they take up less space on the report and are more visibly appealing...here's what i tried in query design:
Code:
Amt: [amount]&Space(1)&[units]
this does not work....in the units table that provides Gallons as a selection in the combo field, Gallons has a key value of 5.....thus, when i run the query using the above code i get 10 5 - where 10 is the amount the amount and 5 is the key from the combo box...

i've tried bringing in the units table but then i get a type mismatch....how can i concatenate the two fields and show the proper units? this has to be simple but i cannot get it to work... :mad:
 
i tried that and it is still giving me a type mismatch. here's my query, if need be i can post the DB (although i'll be out of town until monday, so it'll have to wait until then :) )
Code:
SELECT tblWasteTracker.Building, tblWasteTracker.RoomNum, tblWasteTracker.Generator, tblWasteTracker.WasteDesc, tblWasteTracker.ConAmt, tblWasteTracker.TicketNumber, tblWasteTracker.DateReceived, tblWasteTracker.PickupDate, tblWasteTracker.Comments
FROM tblConUnits INNER JOIN tblWasteTracker ON tblConUnits.ConUnitsID = tblWasteTracker.ConUnits
WHERE (((tblWasteTracker.PickupDate) Is Null));
 
forgot to post a reply...thanks!! that's exactly what it was...i had an autonmumber for the PK and as text in the other table...changed that to long integer and all is well...
 

Users who are viewing this thread

Back
Top Bottom