A
AMN
Hi,
I have an expression with two variables. I would like to write a code to
run the same expression with the different variables. Below is the example:
Variables "stX" and "Y"
Where "stX" is a string and "Y" is a field name in a different table.
I Have 10 sets of "stX" and "Y" combinations.
This is the expression I want to run:
Private Sub ImportMemo_Click
Dim stHeader As String
stX = DLookup ([Y], "Table", MRN = Me.MRN)
If Not stX = "" Then
stX = VbNewLine & stX
stHeader = "Title:"
Else
stX = " "
End If
If Not stHeader = "" Then
Me.Memo = stHeader & stX1 & stX2 &...& stX10
End If
End Sub
Your help is much appreciated.
Thank you.
I have an expression with two variables. I would like to write a code to
run the same expression with the different variables. Below is the example:
Variables "stX" and "Y"
Where "stX" is a string and "Y" is a field name in a different table.
I Have 10 sets of "stX" and "Y" combinations.
This is the expression I want to run:
Private Sub ImportMemo_Click
Dim stHeader As String
stX = DLookup ([Y], "Table", MRN = Me.MRN)
If Not stX = "" Then
stX = VbNewLine & stX
stHeader = "Title:"
Else
stX = " "
End If
If Not stHeader = "" Then
Me.Memo = stHeader & stX1 & stX2 &...& stX10
End If
End Sub
Your help is much appreciated.
Thank you.