J
James Gaylord via AccessMonster.com
I have a for next loop that I thought should work. Basically am setting
certain fields to visible based on a number from a combo box on another form.
What I can't figure out is how to set it up so that I can use the string I
create as part of the me. .visible command.
Here is my code:
Private Sub Form_Open(Cancel As Integer)
Dim stTableNum, stType As String
Dim stNumFields As String
intNumFields = Split(Me.OpenArgs, ";")(0)
For i = 1 To intNumFields
stTableNum = "Table Segment Value " & i
Me.[stTableNum].Visible = True
Next i
stType = Split(Me.OpenArgs, ";")(1)
If stType = "C" Then
Me.Rules_Table_Value.Visible = True
ElseIf stType = "Q" Then
Me.Unit_of_Measure.Visible = True
Me.Item_Number__Short_.Visible = True
Me.Quantity_Per.Visible = True
Else
Me.Entered_Unit_Price.Visible = True
End If
stName = Split(Me.OpenArgs, ";")(2)
Me.Rules_Table_Name = stName
End Sub
I tried me.stTableNum.visible and what you see above to no avail. First, is
it possible to do somehting like this and if so how.
TIA
--
James B Gaylord
From the Wolf Comes the Strength of the Pack
From the Pack Comes the Strength of the Wolf
- R Kipling
Message posted via AccessMonster.com
certain fields to visible based on a number from a combo box on another form.
What I can't figure out is how to set it up so that I can use the string I
create as part of the me. .visible command.
Here is my code:
Private Sub Form_Open(Cancel As Integer)
Dim stTableNum, stType As String
Dim stNumFields As String
intNumFields = Split(Me.OpenArgs, ";")(0)
For i = 1 To intNumFields
stTableNum = "Table Segment Value " & i
Me.[stTableNum].Visible = True
Next i
stType = Split(Me.OpenArgs, ";")(1)
If stType = "C" Then
Me.Rules_Table_Value.Visible = True
ElseIf stType = "Q" Then
Me.Unit_of_Measure.Visible = True
Me.Item_Number__Short_.Visible = True
Me.Quantity_Per.Visible = True
Else
Me.Entered_Unit_Price.Visible = True
End If
stName = Split(Me.OpenArgs, ";")(2)
Me.Rules_Table_Name = stName
End Sub
I tried me.stTableNum.visible and what you see above to no avail. First, is
it possible to do somehting like this and if so how.
TIA
--
James B Gaylord
From the Wolf Comes the Strength of the Pack
From the Pack Comes the Strength of the Wolf
- R Kipling
Message posted via AccessMonster.com