Let me preface this by saying I posted this message to the forms list and didn't get a useful reply. I am reposting to this list to see if what I am trying to do is better accomplished by using underlying VB code. Please comment on the design methodology that would usually be used to perform this type of task.
Thanks Much
-Matt
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.
Thanks Much
-Matt
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.