Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Entering a name and time in a form

Status
Not open for further replies.

Quickchange

Technical User
Jan 31, 2000
4
FR
I have a project Database and users need to be able to enter many employees who are members of a given project. I want these to come from the Employee table. I also need to be able to enter the time each person spends on the project. This will vary and be in hours. I can get a list box on the form to come up with the employee names but how do I get a way to input the time for each? Elizabeth and Jim gave me some good examples of taking values selected in a list box and storing them in a text box in a previous question. If I could add the time to that example and build on it that would be great. If not any ideas on how to accomplish this will be appreciated. Thanks
 
how about this<br>
you have a table for the employee's right<br>
you need another table for say &quot;Jobs&quot;<br>
It can have at elast these 4 fields<br>
<br>
JobID ¦ EmployeeID ¦ Start time ¦ EndTime <br>
<br>
Now<br>
Create a form that's &quot;control Source&quot; is connected to the Jobs table<br>
So you form will look like this<br>
<br>
JobID _______________<br>
<br>
EmplyeeID _________________() &lt; this is a combo box<br>
<br>
Start time __________________<br>
<br>
end Time __________________<br>
<br>
Now then, when a new &quot;Job&quot; comes along.<br>
<br>
Create a new blank Job record and key in Job number<br>
Click the combo box to find the correct Employee<br>
then key in start time and end time<br>
<br>
Next create a query to find any thing you want about the jobs and employee's<br>
and create a report that looks at that query.<br>
<br>
OK
 
If you've finished creating all the underlying tables and your form is bound to that table or a query based on it, you're all set. Just drag the field names from the Fields list (icon on toolbar in design mode) onto your form and they'll automatically store the data the users input. If you haven't created your tables yet, that's where you need to start, not the form. If this is the case, here's a quick overview of all steps needed:<br>
<br>
1. Create tblProject (AutoNumber, ProjectID, ProjectDesc, any other desc data fields)<br>
2. Create tblHours(Autonumber, ProjectID, EmployeeID, Hours. If you want to put hours in on each project each week instead of one total, add a field for Period.<br>
3. Create a one to many relationship between tblProject.ProjectID & tblHours.ProjectID.<br>
4. Create a 1:m between tblEmployee.EmployeeID & tblHours.EmployeeID.<br>
5. Use the form wizard to create a form based on tblProject.<br>
6. Drag a subform onto it (from toolbar in design view). Use the subform wizard to create the subform based on the Hours table.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top