I have a database (ATTACHED) with 2 tables tblData
. The required values from the lookup table are accessed via a query (qryLookupID
) and served as drop downs or multiple checkboxes for user selection, via Access Form or Web Application.
i am trying to join multiple INT IDs stored in a text field to their corresponding text values for dynamic display on a Form or as text for reporting.
In this example I have colours based on an INT ID stored in a text field as comma separated integers as shown in the CURRENT section below. Database normalisation issues aside, how do I perform this join to display the word values in a label or a textbox as shown in the REQUIRED section.
For one table there may be 20+ similar lookups all drawn from a single self-referencing table.
A Local or Global VBA function is preferred but MSACCESS (2003) SQL is fine.
ANY VBA solution MUST NOT rely on a button click event. Just dynamic type events on forms. The main use will be to display current records as words instead of numbers on forms or to display records as text on generated reports.
A sample form has been created with an unbound textbox for dynamic display.
2 Red, Green
3 Red, Green, Blue
4 Red, Green, Blue, Brown
SQL or Code solutions other than MS ACCESS or VBA will be disregarded.