M
mark r
Question: how can I modify my code to utilize the textname selected,
cross-reference it to its associated codenumber, and GOTO the MSG2027F:
Background:
On a subform, when the focus leaves the combobox assessment, I want the code
underneath to check and see if a particular assessment was selected, and if
so, display a messagebox of instructions to the user.
My problem is that assessment is being stored as a text name rather than the
five digit number code associated with that text name. If the code was being
stored inthe field assessment, then I would already have functioning code:
If (Me.assessment = "36500") Then
GoTo doMSG2027F
However, I am storing the textname.
I do not want to write:
If (Me.assessment = "does the textname stored match these alphas") Then
GoTo doMSG2027F
The source query does have both the textname and the codenumber available:
SELECT TableDx.diagname, TableDxdg_category, TableDx.code
FROM Tablecat_category INNER JOIN TableDx xON
Tablecat_category.category_code = TableDx.dg_category
ORDER BY Tablecat_category.category_number;
There does exist a table that relates the testname and the codenumber:
TableDX:
code text input mask 999.99
assessmentDescription text
category text
Is there somesort of lookup code I can insert so that assessment is evaluated
off of the associated code number rather than the text alphas?
If (Me.assessment = "36500") Then
GoTo doMSG2027F
cross-reference it to its associated codenumber, and GOTO the MSG2027F:
Background:
On a subform, when the focus leaves the combobox assessment, I want the code
underneath to check and see if a particular assessment was selected, and if
so, display a messagebox of instructions to the user.
My problem is that assessment is being stored as a text name rather than the
five digit number code associated with that text name. If the code was being
stored inthe field assessment, then I would already have functioning code:
If (Me.assessment = "36500") Then
GoTo doMSG2027F
However, I am storing the textname.
I do not want to write:
If (Me.assessment = "does the textname stored match these alphas") Then
GoTo doMSG2027F
The source query does have both the textname and the codenumber available:
SELECT TableDx.diagname, TableDxdg_category, TableDx.code
FROM Tablecat_category INNER JOIN TableDx xON
Tablecat_category.category_code = TableDx.dg_category
ORDER BY Tablecat_category.category_number;
There does exist a table that relates the testname and the codenumber:
TableDX:
code text input mask 999.99
assessmentDescription text
category text
Is there somesort of lookup code I can insert so that assessment is evaluated
off of the associated code number rather than the text alphas?
If (Me.assessment = "36500") Then
GoTo doMSG2027F