Combo Boxes in Header autopopulate

basshead22

Registered User.
Local time
Yesterday, 18:51
Joined
Dec 17, 2013
Messages
52
I'm trying to create a timesheet database to keep track of employee hours worked. I have my tables set up as follows...

Employee_T
PK -EmployeeID
PositionTitle
Last Name
First Name
Employer

Projects_T
PK-ProjectID
ProjectNumber
ProjectName
WBS

Timesheet_T
PK-TimesheetID
FK - EmployeeID
FK - ProjectID
Sat
Sun
Mon
Tues
Wedn
Thurs
Fri
WeekEnding

My question is on my input form I want to have the user/employee pick his name once in a header combo box as-well as the week ending date and have it populate to every new record that user input (each employee can charge to multiple projects in a week so I want to eliminate the need for them to pick their name and week ending date everytime they select a different job charge.)

John Doe Week Ending 12-20-2013

M T W TH F
Landscaping 8 4 3 2 6
Roofing 3 5 2 1
Plumbing 1 4 1

hope it makes sense!! :banghead:
 
I usually make the user choose his name and week ending on one form, click a button to proceed to the next form and make the defaults or variable point back to the first form. Someone with more knowledge of VBA might have a better way. If nobody else responds, I could upload a sample.
 
@geotch. Thank you for your response. I like ur idea of having them pick name and week ending on another form. Is it possible to see an example?? How form1 and form 2 are linked. Did u use vba to reference back to the first form?
 
No VBA, just in the 2nd form, make the defaults of the employee = [Forms]![NameOfYourForm]![Employee] and the default of your weekenddate= [Forms]![NameOfYourForm]![weekenddate] . Lock both of the fields and make the tab stop No.
Here is an example that does what you want, just different fields.
You'll have to add some other criteria to the form to only show the current employee and week.
 

Attachments

@GEOTCH Thanks for the example! I got it to work on my database with the same concept as yours. One major thing on my timesheet detail form when I input data in any of my fields it automatically creates a new record with the same name and date but what if that person is only inputting one record (Job Charge) that week ending my next record or person that inputs is going to have that default name and date saved to it already... is there a way to tell access not to create a new record until I tell it or click on a macro button?
 
Is actually creating the record? Access will show another record available to enter data and your defaults will show in that record , but until you click into it or add data, it's not really there.

To be sure enter a record then look in the table, do you have one or two new records?
 
Oh nice!! just checked and ur right not adding a new record!! thanks Geotch ur great help! much appreciated.
 

Similar threads

A
Replies
0
Views
3,027
AccessRookie
A

Users who are viewing this thread

Back
Top Bottom