K guys... i'm stuck and i've been searching for about 6 hours and I hope it's an easy answer.
This is what I have:
[Code=vb]
Private Sub Detail_Print(Ca ncel As Integer, PrintCount As Integer)
Dim BegSerial As Integer
Dim srl As String
txtSerial1.Capt ion = Serial
BegSerial = Serial
If txtSerial1.Capt ion = Serial Then
For x = 1 To 10
srl = "txtSerial" & x
MsgBox (srl)
srl.Caption = BegSerial
BegSerial = BegSerial + 1
Next x
End If
End Sub
[/Code]
Serial is a global variable input by a form
I have 10 labels on a report ex. txtSerial1 txtSerial2 etc. I need those to me incremented by 1 based off the first serial (BegSerial).
I could do it the long way:
if txtserial1.capt ion = serial then
begserial = begseiral +1
end if
if txt... yadada
there has to be an easier way HELP!!!!
This is what I have:
[Code=vb]
Private Sub Detail_Print(Ca ncel As Integer, PrintCount As Integer)
Dim BegSerial As Integer
Dim srl As String
txtSerial1.Capt ion = Serial
BegSerial = Serial
If txtSerial1.Capt ion = Serial Then
For x = 1 To 10
srl = "txtSerial" & x
MsgBox (srl)
srl.Caption = BegSerial
BegSerial = BegSerial + 1
Next x
End If
End Sub
[/Code]
Serial is a global variable input by a form
I have 10 labels on a report ex. txtSerial1 txtSerial2 etc. I need those to me incremented by 1 based off the first serial (BegSerial).
I could do it the long way:
if txtserial1.capt ion = serial then
begserial = begseiral +1
end if
if txt... yadada
there has to be an easier way HELP!!!!
Comment