Unanswered: Use Query Expresstion stored in a Combo Box Value
I am trying to create an export feature with having a maximum of 12 fields to export. The problem is I am trying to make it as simple as I can for the users.
I created a table with Expressions such as "Trim([tblMaster]![FirstName] &" "& [tblMaster]![LastName])" for a Fullname field or just simply "Trim([tblMaster]![FirstName])" for a last name field. I am trying to do this so we can change the formats of
In a query I add the "tblMaster" table and reference the field data to a Combo box on a form, eg. "[Forms]![frmExport]![cmbLine1].Value". I would like to process the Expression, however it only returns the Text as you know "Trim([tblMaster]![FirstName] &" "& [tblMaster]![LastName])" instead of "John Smith".
If anyone has any ideas I would really appreciate it.
If i understand your problem, you are trying to put expressions directly in the table fields. If so, your problem is very easy to solve.
Instead of put expressions in the fields table, (Note: When designing tables and fields you can not insert expressions, only define the type of field), try to use a form and in the event procedure (AfterUpdate) of the controls insert:
[field_FullName]=Trim(Me![field_FirstName]) & " " & Trim(Me![Field_LastName]),
what this does, it's when the user enter first name="John", and last name="Smith", your Full Name field will have "John Smith".
then, when you try to search the names in a combobox based on the the table and refering the bound column to the full name field, you will see "John Smith".