natesternberg
Registered User.
- Local time
- Today, 05:20
- Joined
- Mar 3, 2011
- Messages
- 11
Ok, I have a simple question. I have a database containing volunteers and the hours they worked. There's two tables:
tblVolunteers:
ID AutoNumber
FName Text
LName Text
tblHours:
workID AutoNumber
workerID Number (foreign key)
StartTime Date/Time
EndTime Date/Time
I want a datagrid-like form where the user inputs start and end time, and selects the volunteer's name from a drop-down (populated from tblVolunteers). Then, when the user completes the row, it looks up the corresponding ID from tblVolunteers and puts it in tblHours.workerID.
Now, I can make a drop-down that gets populated from tblVolunteers (by setting its "Row Source" to a query). What I don't know how to do is perform the appropriate lookup to fill in tblHours.workerID. This is probably easy to do, but this is my first database.
(I'm familiar with VBA and T-SQL, by the way; just not sure how to set up the form).
Any suggestions?
tblVolunteers:
ID AutoNumber
FName Text
LName Text
tblHours:
workID AutoNumber
workerID Number (foreign key)
StartTime Date/Time
EndTime Date/Time
I want a datagrid-like form where the user inputs start and end time, and selects the volunteer's name from a drop-down (populated from tblVolunteers). Then, when the user completes the row, it looks up the corresponding ID from tblVolunteers and puts it in tblHours.workerID.
Now, I can make a drop-down that gets populated from tblVolunteers (by setting its "Row Source" to a query). What I don't know how to do is perform the appropriate lookup to fill in tblHours.workerID. This is probably easy to do, but this is my first database.
(I'm familiar with VBA and T-SQL, by the way; just not sure how to set up the form).
Any suggestions?