Hi everybody,
[Access 2003]
I have a combo box field in a table with a number data type that has a row source to another table that has the text value for the item selected. Now, in one of my queries, I would like to access the text value of this field without having to add the second table to my query. Is that possible? I've done it in forms and reports using the .Text or .Column property, but I'm not seeing that has an option in the Expression builder.
Here's an very simplified example of what I'm talking about. The two tables are:
There's a one-to-many relationship between tblRecords and tblParts. In the query I'm trying to create, which includes another table and isn't important to the example, I have PartID as one of the fields. PartID shows up in the query as a combo box and displays the value, but it's bound to the number in the table. I want to grab the text for the field instead of the number.
So if PartIDFK = 2, but the display value is "Engine", I want to be able to access "Engine" in the expression instead of 2.
Just to hopefully address a question you might have, I can't include tblParts in the query because it negatively affects the code in a form where I'm using the query.
Thanks,
beacon
[Access 2003]
I have a combo box field in a table with a number data type that has a row source to another table that has the text value for the item selected. Now, in one of my queries, I would like to access the text value of this field without having to add the second table to my query. Is that possible? I've done it in forms and reports using the .Text or .Column property, but I'm not seeing that has an option in the Expression builder.
Here's an very simplified example of what I'm talking about. The two tables are:
Code:
tblRecords 'Not all fields shown RecordID: Autonumber PartIDFK: Number 'Combo box with row source = tblParts. Displays the second of 2 columns in table (PartName)
Code:
tblParts PartID: Autonumber PartName: Text
So if PartIDFK = 2, but the display value is "Engine", I want to be able to access "Engine" in the expression instead of 2.
Just to hopefully address a question you might have, I can't include tblParts in the query because it negatively affects the code in a form where I'm using the query.
Thanks,
beacon
Comment