Group multiple records by date on from

  • Thread starter Thread starter Randy
  • Start date Start date
R

Randy

I am trying to figure the best approach to the following problem. I need a
form based on a table "idrb" with the following fields: IdrbID, EmployeeID,
CurrentDate, District, CustomerID, fees, Hours, Miles, Product.
My form will be a daily log of all employee activities. On my form, I will
enter the following once.: Date, EmployeeID, District. I may have from 1
to 10 records for the other fields, such as: CustomerID, Fees, Hours, Miles,
Product. I need to have all records show on my form only once. All the
info grouped by date as if one record on my form. I tried to use a subform
for CustomerID, Fees, Hours, Miles, Product but couldn't get it to work
properly. Thanks..Randy
 
If you're going to have multiple records per employee/date for customerID,
fees, hours, miles, product, then those fields should be in a separate
table.

Your idrb would be the master table containing IdrbID, EmployeeID, and
CurrentDate. The child table would contain the above fields plus the idrbID
(I'm assuming it's the primary key of the main table) and it's own unique
autonumber field. Note that idrbID in the child table would be a long
integer and NOT an autonumber field.

Idrb would be the recordsource for the main form, the new table would be the
recordsource for the subform. The main and sub would be linked on idrbID.

This is pretty basic design stuff; I suggest you go to the bookstore and
get a basic book on Access Development (Wrox Press, Sybex, Microsoft Press,
etc.).
 
Thanks for your help..
JP said:
If you're going to have multiple records per employee/date for customerID,
fees, hours, miles, product, then those fields should be in a separate
table.

Your idrb would be the master table containing IdrbID, EmployeeID, and
CurrentDate. The child table would contain the above fields plus the
idrbID
(I'm assuming it's the primary key of the main table) and it's own unique
autonumber field. Note that idrbID in the child table would be a long
integer and NOT an autonumber field.

Idrb would be the recordsource for the main form, the new table would be
the
recordsource for the subform. The main and sub would be linked on idrbID.

This is pretty basic design stuff; I suggest you go to the bookstore and
get a basic book on Access Development (Wrox Press, Sybex, Microsoft
Press,
etc.).
 
Back
Top