More help

FXST2001

New member
Local time
Tomorrow, 09:31
Joined
Aug 3, 2010
Messages
5
How can I do the following? I keep going around in circles.


I have a personnel db, that lists the normal personnel details including trade. what I need to do, is based on their trade, so when their trade is selected to have the required course boxes to be populated:


Select "Trade 1" (combo box?)


The course requirements will then populate and the dates can be inserted and saved against the members record.

Table1
ID PK autonumber
Surname text
Name text
Trade text


Table2 (trade name)
Trade linked to table1
course1 date
course2 date
course3 date


Table3 (trade name)
Trade linked to table1
course1 date
course2 date
course3 date
 
Last edited:
In the AfterUpdate event of the combobox where the user selects the trade, change the rowsource of the combobox that lists the courses available e.g.

Code:
If Me.YourTradeComboBoxNameHere = "1stTradeHere" Then
     Me.YourCourseComboBoxNameHere.RowSource = SELECT Your1stTradeTableNameHere.YourCourseFieldInYour1stTradeTableHere FROM Your1stTradetableNameHere
ElseIf Me.YourTradeComboBoxNameHere = "2ndTradeHere" Then
     Me.YourCourseComboBoxNameHere.RowSource = SELECT Your2ndTradeTableNameHere.YourCourseFieldInYour2ndTradeTableHere FROM Your2ndTradetableNameHere
ElseIf Me.YourTradeComboBoxNameHere = "3rdTradeHere" Then
     Me.YourCourseComboBoxNameHere.RowSource = SELECT Your3rdTradeTableNameHere.YourCourseFieldInYour3rdTradeTableHere FROM Your3rdTradetableNameHere
[COLOR=lime]'etc etc[/COLOR]
End If
 
Thanks again dbDamo,


This forum is such a valuable source of information and answers.


Cheers


Eddie
 

Users who are viewing this thread

Back
Top Bottom