Subdatasheets

G

Guest

I am trying to add a service history per each customer's vehicle. When I
added a record on one of the subdatasheet it copies to all the subdatasheets.
Help! How do I avoid this?
 
T

tina

first, i wouldn't use a subdatasheet in a table. for more information, see
http://allenbrowne.com/bug-09.html and scroll down to Tables:
SubdatasheetName. normally, you use a mainform/subform setup to handle data
entry into a parent table and its' related child table.

sounds like the relationship between the vehicle table and the service
history table is not correctly set up. you probably have (or probably should
have) the following tables, as

tblCustomers
CustID (primary key)
FirstName
LastName
(other fields that describe a customer)

tblCustomerVehicles
VehicleID (primary key)
VehicleYear
VehicleMake
VehicleModel
CustomerID (foreign key from tblCustomers)

tblVehicleServiceHistory
HistoryID (primary key)
VehicleID (foreign key from tblCustomerVehicles)
ServiceDate
(other fields that describe a specific instance of service for a specific
vehicle)

the relationships are
tblCustomers.CustomerID 1:n tblCustomerVehicles.CustomerID
tblCustomerVehicles.VehicleID 1:n tblVehicleServiceHistory.VehicleID

the proper table structure and relationships are necessary for records to be
stored and related correctly, so check your design to see if it matches the
above example. post back with further questions, more detail, etc, as
needed.

hth
 
G

Guest

This problem might be: you are using an update query. Hope this was a useful
response. I believe you've used the word subdatasheet improperly in this
posting [I've been wrong :) Another possibility is that you're using a
faulty relationship structure.
 
V

Van T. Dinh

Have you set the LinkMasterFields and LinkChildFields for the Sub-Datasheet?

OTOH, proper interface for data entry is Form / Subform combination and
users should NOT enter data directly in the DatasheetView of the Parent
Table / Child Table.
 
G

Guest

Thanks,, will let youknow how it goes,,

tina said:
first, i wouldn't use a subdatasheet in a table. for more information, see
http://allenbrowne.com/bug-09.html and scroll down to Tables:
SubdatasheetName. normally, you use a mainform/subform setup to handle data
entry into a parent table and its' related child table.

sounds like the relationship between the vehicle table and the service
history table is not correctly set up. you probably have (or probably should
have) the following tables, as

tblCustomers
CustID (primary key)
FirstName
LastName
(other fields that describe a customer)

tblCustomerVehicles
VehicleID (primary key)
VehicleYear
VehicleMake
VehicleModel
CustomerID (foreign key from tblCustomers)

tblVehicleServiceHistory
HistoryID (primary key)
VehicleID (foreign key from tblCustomerVehicles)
ServiceDate
(other fields that describe a specific instance of service for a specific
vehicle)

the relationships are
tblCustomers.CustomerID 1:n tblCustomerVehicles.CustomerID
tblCustomerVehicles.VehicleID 1:n tblVehicleServiceHistory.VehicleID

the proper table structure and relationships are necessary for records to be
stored and related correctly, so check your design to see if it matches the
above example. post back with further questions, more detail, etc, as
needed.

hth
 
G

Guest

Hi Thanks for the reply..I don't understand what's an update query.. sorry
i'm really new.. I have a table for my contacts and want to make a subdata
for wach customer containing their car service history. Everytime I add a
data in that subsheet it copies to all other customers sub sheet.
 
G

Guest

You mean I should not enter manually data in the subsheet? I'll try the forms
and subform.. hmmm.. I am so new in this but I hope I'll be successful.
Thanks!
 
V

Van T. Dinh

I am sure there is a Form Wizard that can create the Form / Subform
combination for you.
 

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