dbTalk Databases Forums  

relational problem MS-Access 2003

comp.databases.ms-access comp.databases.ms-access


Discuss relational problem MS-Access 2003 in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Monika
 
Posts: n/a

Default relational problem MS-Access 2003 - 07-27-2009 , 01:50 PM






Hi,

I have created a Training database. Employees need to enter their
training each month. I have created three tables: Employee, Unit, and
training. (We have 3 units, I created this for report purpose, so I
can report each unit did what trainings). Now, problem is when
employees want to enter their training they shouldn't type their
Employee ID and Unit ID, it should pop up automatically based on their
name they choose from combobox. but it doesn't. I don't know how to
solve this problem. Please help. Thank you.

Reply With Quote
  #2  
Old   
MGFoster
 
Posts: n/a

Default Re: relational problem MS-Access 2003 - 07-29-2009 , 12:04 AM






Monika wrote:
Quote:
Hi,

I have created a Training database. Employees need to enter their
training each month. I have created three tables: Employee, Unit, and
training. (We have 3 units, I created this for report purpose, so I
can report each unit did what trainings). Now, problem is when
employees want to enter their training they shouldn't type their
Employee ID and Unit ID, it should pop up automatically based on their
name they choose from combobox. but it doesn't. I don't know how to
solve this problem. Please help. Thank you.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I don't know which table each employee's Unit ID is in. I'll assume
it's in Employees table.

Set the Employee ID ComboBox's properties to this:

Column Count: 3
Column Widths: 0";0";2"
Bound Column: 1
Limit To List: Yes
Row Source Type: Table/Query
Row Source: SELECT EmployeeID, UnitID, EmployeeName FROM Employees ORDER
by EmployeeName

In the ComboBox's AfterUpdate event procedure put this (EmployeeID is
the name of the ComboBox - change as needed):

Private Sub EmployeeID_AfterUpdate()

If Not IsNull(Me!EmployeeID) Then

' Push the UnitID into the UnitID control.
' UnitID is in the 2nd column of the ComboBox's RowSource.
' ComboBox columns are count-zero.

Me!UnitID = Me!EmployeeID.Column(1)

End If

End Sub

HTH,
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
** Respond only to this newsgroup. I DO NOT respond to emails **

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBSm/YV4echKqOuFEgEQI1SwCguWH/KPoH8hqPTlWiK4H9sLMba+0An23y
Y7REr+RU8j6WaqDMVaXewOUj
=WKX/
-----END PGP SIGNATURE-----

Reply With Quote
Reply




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 On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.