Syncing Forms and Subforms when Editing Data

mrod

New member
Local time
Today, 06:18
Joined
Jan 22, 2002
Messages
6
I am putting together a basic time tracking system and am having trouble with syncing the form and sub form when editing the timesheets.

I have a table called Time_Card which contains:

Time_Card_Key (Primary Key)
Employee_Id
Date_Worked

I have another table named Time_Card_Detail which contains:

Time_Card_Detail_key (Primary Key)
Time_Card_key
Work_code
Etc..

The database is constructed so that Time_Card.Time_Card_Key has a one-to-many relationship with Time_Card_Detail.Time_Card_Key.

The recordsource for the form is Time_Card. The basis of the form is to select an Employee_key(select query form another table named Employee_Name) and Date_worked(Based off of a query which using the given employee key to limit the Time_Card_key value to one record). Which are both values in the form. Once this is done the corresponding detailed entries should show up in the subform.

My Master-Child links are Time_Card.Time_Card_key
Time_Card_Detail.Time_Card_Key

So my question is how do I pass the Time_Card_Key value I derive in the query underlying Date_Worked to the form which in turn should syncronize the subform? Am I doing this completely wrong or am I missing somthing simple? I have tried to base the form off of a query which determines a value of Time_Card_key based on the employee_key and Date_worked selected, however since there is no initial value when the form opens, the subform is not even visible.

Any and all help is appreciated. I apologize for the length of the post.

Thanks,
-Matt
 
I think I understand. Do you use a combo boxes at all? The wizard will create a combo box for you which will find information on your form based on what the user choooses from the combobox. You could have a combo box for employee key and Date-worked.
 
Thanks for the input, however I don't think that is what I am looking for. I do use combo boxes. The Employee_key is a combo box based on a select query. The Date_Worked is a combo box based on a query which derives the availible dates worked for the selected employee. Basically I would like to keep the pick your name, then pick a date format if possible.

-matt
 
If anyone has any other comments I would love to hear them..
wink.gif


Thanks,
-Matt
 

Users who are viewing this thread

Back
Top Bottom