Hello again all,
I have a Select Case statement that I am trying to use to change the Control Source of a text box on a form based on what is selected in a Cbo Box
Here is my code:
Select Case Prod
Case "S001"
Forms!Letter!View_Body.ControlSource = DLookup("[Stan_Ltr]", "Tbl_Ltr", "[Let_Code] = S001"
Case Else
With CodeContextObject
Forms!Letter!View_Body.ControlSource = Ltr_V1(.Prod, .Act_Num)
End With
End Select
There a quite a few extra cases but I wanted to keep it simple.
The Case Else statement I am trying to get the Control Source to be another Function that I have.
Any help is appreciated!
Chris
I have a Select Case statement that I am trying to use to change the Control Source of a text box on a form based on what is selected in a Cbo Box
Here is my code:
Select Case Prod
Case "S001"
Forms!Letter!View_Body.ControlSource = DLookup("[Stan_Ltr]", "Tbl_Ltr", "[Let_Code] = S001"
Case Else
With CodeContextObject
Forms!Letter!View_Body.ControlSource = Ltr_V1(.Prod, .Act_Num)
End With
End Select
There a quite a few extra cases but I wanted to keep it simple.
The Case Else statement I am trying to get the Control Source to be another Function that I have.
Any help is appreciated!
Chris