layout of tables and query

B

babs

I have 3 tables

CLIENTTABLE
clientid-PK
clientnumb
clientname
address
state
etc

TBLTANKRATES2
rateid
clientid-pk
pickupyd-pk
pickupydname
delivyd-pk
delivydname
typeofmat-pk
rate

TANKTICKETENTRY
clientid-pk
ticket-pk
servicedate
typeofmat
pickupdyd
delivyd
truck#
gross weight
comment

I need to grab the rate value from the tanksrate2 table where the
clientid,pickupyd, delivyd, and typeofmat are the same.

Joins for query clienttable (clientid-clientid)tankticketentry
tankrate2 (clientid-clientid)tankticketntry
tankrate2 (pickupyd-pickupyd)tankticketntry
tankrate2 (delivyd-delivyd)tankticketntry
tankrate2 (typeofmat-typeofmat)tankticketntry

The query worked fine except there may be a situation where there may be a
pickup yd with the same # but different pickupydname and same for deliv. so
I made the pickupydname and delivydname primary keys also in the tankrate2
table and now the query is not updatable. not sure how to lay this out. The
rate is not a calculated field just based on the clientid,
pickupyd,pickupydname,delivyd,delivydname, and typeofmat. want on the form
based on this query for the rate to automatically fill in based on all of
these items.

Thanks for your help,
Barb
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top