crossy5575
Registered User.
- Local time
- Today, 19:45
- Joined
- Apr 21, 2015
- Messages
- 46
Hi there,
i am creating a form which has lots of small fields (which will be colored dependent on value).
There are lots of rows of these fields and as such need to have a variable array name which changes on a loop.
the array is called myha, myhb, myhc... and so on.
so i need to adapt this code to allow it - however i dont know how to do it... can you help??
I also need to know what to declare these variables as!
I have an issue with the line Str(vmax)(i, 2)
i am creating a form which has lots of small fields (which will be colored dependent on value).
There are lots of rows of these fields and as such need to have a variable array name which changes on a loop.
the array is called myha, myhb, myhc... and so on.
so i need to adapt this code to allow it - however i dont know how to do it... can you help??
I also need to know what to declare these variables as!
I have an issue with the line Str(vmax)(i, 2)
PHP:
' Gives the number of repetitions i need
For aa = 0 To 13
'I have a "myhm" field for something else so need to skip this!
If aa = 12 Then GoTo xloop
If Letter = "A" Then GoTo leta
Letter = Chr(Asc(Letter) + 1)
leta:
'creates the variable Myha, myhb etc which will give a different arrray each time
vmax = "myh" & LCase(Letter)
'looping code for each of the individual textboxes
For i = LBound(myday) To UBound(myday)
If Not IsEmpty(myday(i, 1)) Then
rs.Filter = "[staff no] =" & myh(aa + 1, 0) & "And [StartDate] >=" & myday(i, 0)
Set rsfiltered = rs.OpenRecordset
Do While (Not rsfiltered.EOF)
'am having this problem - where vmax should be the arrayname, then followed by the array variable
If IsEmpty((vmax) (i, 2)) Then
Str(vmax)(i, 2) = rsfiltered![Type]
End If
rsfiltered.MoveNext
Loop
End If
Next i
xloop:
Next aa
Last edited: