Duplicate Records in a one-to-many relationship

suradj

Registered User.
Local time
Today, 15:14
Joined
May 5, 2010
Messages
21
Friends,

I need some help.

I have a database with 3 tabels: tblUsers,tblHourpayment,tblPayment.
tblHourpayment and tblPayment has a one to many relationship with tblUsers.
i have created a form based on tblUsers, and one field(hourpayment) of tblHourpayment.
In tblHourpayment one UserID can have many records.

So the problem is if i have 2 or more records for 1 user in tblHourpayment i see 2 or more times the user in my form. I have duplicate records in my form if i enter more information in tblHourpayment

What i want is that in the form i must see the user 1 time with the last record of the tblhourpayment field hourpayment.

Please help.

See attacment
 

Attachments

Hello there. Here are a few observations after having taken a look at the database you posted.
- You don't need both tblHourPayment and tblPayment.
- tblPayment, if you keep it, should not store the name of the user.
- The main form should be based on a single table, not on a join with a child table. If there are multiple related records in a child table then these should appear in a subform.
Please post back if you need more clarification,
Cheers,
 
Thanks man. It worked. I created a subform and the problem was solved.
 

Users who are viewing this thread

Back
Top Bottom