In a question somewhat related to my previous post...
In a table named schedule I have two combo boxes named divivionCombo and classtypeCombo
Here's my record source for divisionCombo:
SELECT [divisionID], [divisionName] FROM Division ORDER BY [divisionName]
and for classTypeCombo:
SELECT [classTypeID], [classTypeName] FROM classType WHERE [classType].[divisionID]=[Forms]![schedules]![divisionCombo];
Note: divisionID and classTypeID are hidden
Here's my problem:
In another table named attendance I need to create a combo box that combines info from each of these boxes as well as addition fields. I have created a combo box named scheduleCombo with the following code:
SELECT [scheduleID], [divisionCombo] & ", " & [classTypeCombo] & " " & [startDate] FROM schedule ORDER BY [startDate];
When this field is displayed it only shows the hidden fields of divisionID and classTypeID NOT the divisionName and classTypeName that I am expecting (startDate does appear correctly)
Finally, I can write a query to pull the info I want and when I run the query it produces the correct info, i.e. names not ids. However, if I change row source of scheduleCombo to the query I get the same results as above, i.e. ids not names.
What am I doing wrong?
Any help is appreciated! Thanks!
In a table named schedule I have two combo boxes named divivionCombo and classtypeCombo
Here's my record source for divisionCombo:
SELECT [divisionID], [divisionName] FROM Division ORDER BY [divisionName]
and for classTypeCombo:
SELECT [classTypeID], [classTypeName] FROM classType WHERE [classType].[divisionID]=[Forms]![schedules]![divisionCombo];
Note: divisionID and classTypeID are hidden
Here's my problem:
In another table named attendance I need to create a combo box that combines info from each of these boxes as well as addition fields. I have created a combo box named scheduleCombo with the following code:
SELECT [scheduleID], [divisionCombo] & ", " & [classTypeCombo] & " " & [startDate] FROM schedule ORDER BY [startDate];
When this field is displayed it only shows the hidden fields of divisionID and classTypeID NOT the divisionName and classTypeName that I am expecting (startDate does appear correctly)
Finally, I can write a query to pull the info I want and when I run the query it produces the correct info, i.e. names not ids. However, if I change row source of scheduleCombo to the query I get the same results as above, i.e. ids not names.
What am I doing wrong?
Any help is appreciated! Thanks!