A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Combo Box & Text Box



 
 
Thread Tools Display Modes
  #1  
Old March 23rd, 2005, 02: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 =)
  #2  
Old March 23rd, 2005, 02:46 AM
Scott McDaniel
external usenet poster
 
Posts: n/a
Default

Populating the EmpName:

in the AfterUpdate event
Me.EmpName = Me.EmpNum.Column(1)
'/Note: this assumes that you have set the EmpNum .columncount = 2 ...
columns are zero based, therefore the First column is Column(0), second is
Column(1) etc

Updating your table
If your TimeEntyr form is based on your TimeCard table, then Access will
update it for you


"AccessRookie" wrote in message
...
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 =)



  #3  
Old March 23rd, 2005, 08:35 PM
AccessRookie
external usenet poster
 
Posts: n/a
Default

I added your recommend code, but then it gave me this Error Message after
selecting Employee Number Combo Box:
The value you entered isn't valid for this field.

For example, you may have entered text in a numeric field or a number that
is larger than the FieldSize Setting permits.

All of the fields that are on this form is from tblTimecard table. Your
code suggestion made sense. What am I missing that makes this error message
display? Need more help.

"Scott McDaniel" wrote:

Populating the EmpName:

in the AfterUpdate event
Me.EmpName = Me.EmpNum.Column(1)
'/Note: this assumes that you have set the EmpNum .columncount = 2 ...
columns are zero based, therefore the First column is Column(0), second is
Column(1) etc

Updating your table
If your TimeEntyr form is based on your TimeCard table, then Access will
update it for you


"AccessRookie" wrote in message
...
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) EmpName = Text
4) EmployeeId = Number
5) PayPeriod = Date/Time
6) EmployeeClass = Text
7) EmployeeType = Text
8) SAT = Number
9) SUN = Number
10) MON = Number
11) TUE = Number
12) WED = Number
13) THU = Number
14) FRI = Number
15) CostCenter = Number
16) AcctNo = Number
17) Category = Text
18) AcctName = Text
19) AcctDescription = Text
20) PayType = Text
21) Allocation = Text
22) TotalRegHrs = Number
23) TotalOTHrs = Number
24) TotalVacHrs = Number
25) TotalHolHrs = Number
26) TotalSickHrs = Number
27) 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 =)

  #4  
Old April 6th, 2005, 11:33 PM
AccessRookie
external usenet poster
 
Posts: n/a
Default

I found my answer on another site that solved this Combo Box & Text Box issue
on data entry form. Here is the URL:
http://www.access-programmers.co.uk/...ad.php?t=73261

Hopefully that will help others on this site if they run across this same
issue that I had.

"AccessRookie" wrote:

I added your recommend code, but then it gave me this Error Message after
selecting Employee Number Combo Box:
The value you entered isn't valid for this field.

For example, you may have entered text in a numeric field or a number that
is larger than the FieldSize Setting permits.

All of the fields that are on this form is from tblTimecard table. Your
code suggestion made sense. What am I missing that makes this error message
display? Need more help.

"Scott McDaniel" wrote:

Populating the EmpName:

in the AfterUpdate event
Me.EmpName = Me.EmpNum.Column(1)
'/Note: this assumes that you have set the EmpNum .columncount = 2 ...
columns are zero based, therefore the First column is Column(0), second is
Column(1) etc

Updating your table
If your TimeEntyr form is based on your TimeCard table, then Access will
update it for you


"AccessRookie" wrote in message
...
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) EmpName = Text
4) EmployeeId = Number
5) PayPeriod = Date/Time
6) EmployeeClass = Text
7) EmployeeType = Text
8) SAT = Number
9) SUN = Number
10) MON = Number
11) TUE = Number
12) WED = Number
13) THU = Number
14) FRI = Number
15) CostCenter = Number
16) AcctNo = Number
17) Category = Text
18) AcctName = Text
19) AcctDescription = Text
20) PayType = Text
21) Allocation = Text
22) TotalRegHrs = Number
23) TotalOTHrs = Number
24) TotalVacHrs = Number
25) TotalHolHrs = Number
26) TotalSickHrs = Number
27) 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 =)

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with design Ronnie Database Design 6 March 12th, 2005 03:53 PM
Access reports with a horizontal line after each record??? Bill via AccessMonster.com Setting Up & Running Reports 6 March 9th, 2005 05:51 PM
Outline Renee Hendershott Page Layout 2 December 25th, 2004 03:49 PM
textbox to normal text Jack Sons New Users 16 December 5th, 2004 04:44 PM
Combo Box -- Select Text and On Change Sheldon Penner Using Forms 4 November 8th, 2004 05:49 AM


All times are GMT +1. The time now is 08:43 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.