lookup price of some services different by the Company Name

Falcon88

Registered User.
Local time
Today, 19:32
Joined
Nov 4, 2014
Messages
318
hiii dears

i have a db to collect the services of polyclinic center that handle with insurance companies and thier costumers.
- tblBillHead : contains a field companyID (fk connected to tblCompanyData on Pk CompanyID)
- tblBillDetails (conjunction table) : contains ServiceNo , BillNo , ServicePriceB
- tblServices : ServiceID , ServiceName , ServicePrice .

the services name is the same for all that companies , but the difference is on the Service Price , for every company a service price Example :
ServiceIDCompanyID2ServiceNameServicePrice
11CBC200
22CBC150
33CBC100
41ESR50
52ESR100
63ESR75

i do not want to reapeat the Service Name for every Company .because the names is the same for all that companies

what is the right method to deal with that problem ?
 
Where are we? In a query, in a table? You wrote words about 3 tables and then threw a bunch of data at us that didn't conform to any of the prior listed tables.

I think the question is--I need a table that matches what companies get what prices for what services. Correct? If so, this is the table you need:

tblCompanyServicePrices
csp_ID, autonumber, primary key
ID_Service, number, foreign key to tblServices
ID_Company, number, foreign key to tblCompanyData
csp_Price, number, the price of the service for that company

That's it, those 4 fields will sort out what company gets what prices for what service.

My recommendation, is to complete the relationship tool in Access, expand the tables to show all fields, take a screenshot and post it back here and we can help make sure you have your table sructure correct.
 
i agree with the suggestion.
you need "another" table, and you use this in all your transactions.
tblServices.png
tblServices2.png
serviceprice.png
serviceprice2.png
 
hiii dears

i have a db to collect the services of polyclinic center that handle with insurance companies and thier costumers.
- tblBillHead : contains a field companyID (fk connected to tblCompanyData on Pk CompanyID)
- tblBillDetails (conjunction table) : contains ServiceNo , BillNo , ServicePriceB
- tblServices : ServiceID , ServiceName , ServicePrice .

the services name is the same for all that companies , but the difference is on the Service Price , for every company a service price Example :
ServiceIDCompanyID2ServiceNameServicePrice
11CBC200
22CBC150
33CBC100
41ESR50
52ESR100
63ESR75

i do not want to reapeat the Service Name for every Company .because the names is the same for all that companies

what is the right method to deal with that problem ?
You have no choice, if you want to relate company,service and price?
Be it service name or service ID.
 

Users who are viewing this thread

Back
Top Bottom