View Single Post
  #1  
Old March 23rd, 2005, 01:25 AM
AccessRookie
external usenet poster
 
Posts: n/a
Default Combo Box & Text Box

Help me, please! I am putting together an automated Time Card Entry Form. I
have the following fields on this form as follows:
1. Week Ending: manual entry with "mm/dd/yyyy" date format.
2. Employee Number: combo box that will populate next field, Employee
Name, after user select correct Employee Number.
3. Employee Name: Text Box will appear "LastName, FirstName" order.
4. Description: combo box containing a list of labor description that has
associated fields as follows.
5. Cost Center: Text Box will populate after selecting Description.
6. Acct: Text Box will populate after selecting Description.
7. Category: Text Box will populate after selecting Description.
8. Pay Type: Combo Box to eliminate data entry errors.
9. Allocation: Free form, to type comments.
10. Days of Week: Sat, Sun, Mon, Tue, Wed, Thu, Fri
11. Regular: totals of regular hours worked
12. Overtime: totals of overtime hours worked
13. Vacation: totals of vacation hours taken
14. Holiday: totals of holiday hours taken
15. Sick: totals of sick hours taken
16. Personal: totals of personal hours taken

Here are my tables:
1. tblEmployees:
1) LastName = Text
2) FirstName = Text
3) EmployeeId = Number (Primary Key)
4) EmployeeClass = Text
5) EmployeeType = Text

2. tblAccounts:
1) CostCenter = Number
2) AcctNo = Number
3) Category = Text
4) AcctName = Text
5) AcctDescription = Text
6) PayType = Text

3. tblPayType:
1) PayType = Text
2) Description = Text

4. tblRegRate:
1) EmployeeId = Number (Primary Key)
2) EmployeeType = Text
3) PayType = Text
4) HourlyRate = Number
5) AnnualRate = Number

5. tblOtRate:
1) EmployeeId = Number (Primary Key)
2) EmployeeType = Text
3) PayType = Text
4) RegHourlyRate = Number
5) OTHourlyRate = Number
6) AnnualRate = Number

6. tblDdRate:
1) EmployeeId = Number (Primary Key)
2) EmployeeType = Text
3) PayType = Text
4) RegHourlyRate = Number
5) DDHourlyRate = Number
6) AnnualRate = Number

7. tblTimecard:
1) LastName = Text
2) FirstName = Text
3) EmployeeId = Number
4) PayPeriod = Date/Time
5) EmployeeClass = Text
6) EmployeeType = Text
7) SAT = Number
8) SUN = Number
9) MON = Number
10) TUE = Number
11) WED = Number
12) THU = Number
13) FRI = Number
14) CostCenter = Number
15) AcctNo = Number
16) Category = Text
17) AcctName = Text
18) AcctDescription = Text
19) PayType = Text
20) Allocation = Text
21) TotalRegHrs = Number
22) TotalOTHrs = Number
23) TotalVacHrs = Number
24) TotalHolHrs = Number
25) TotalSickHrs = Number
26) TotalPersHrs = Number

Here is my question MS Access 2002: I have a Combo Box, EmpNum(contains
employee number) then I want to populate the Text Box, EmpName(contains
employee names associated with employee number). On the EmpNum Combo Box
properties:
1. Row Source Type: Table/Query
2. Row Source: Sel_EmpNum query(see below for query)
SELECT
tblEmployees.EmployeeId,
Trim([LastName] & ", " & [FirstName]) AS EmpName
FROM tblEmployees
GROUP BY tblEmployees.EmployeeId, Trim([LastName] & ", " & [FirstName])
ORDER BY Trim([LastName] & ", " & [FirstName]);

3. After Update: [Event Procedure] -- (what VBA code do I need to put in
this section)?

4. What code do I put into TimeEntry form to make it update to TimeCard
table after selecting & entering all needed data?

It's been a while since I have done Access development.
Sincerely,
AccessRookie =)