G
Guest
I have to see if the contents of 250 fields are all zero. I just cannot find the correct syntax. What I have so far is shown below
Dim db As Databas
Dim rst As Recordse
Dim ChkByte As Byt
Dim wrkIndx As Byt
Dim HoldIt As Strin
Dim WNWN As Byt
Set db = CurrentD
Set rst = db.OpenRecordset("SELECT * FROM UNIVREC"
Do Until rst.EO
wrkIndx =
For wrkIndx = 1 To 2
If wrkIndx < 10 The
HoldIt = "WN0" & wrkInd
Els
HoldIt = "WN" & wrkInd
End I
WNWN = (rst!(= HoldIt)) ' This is where my problem is . WNWN should be 0 or a number from 1 to 129.
MsgBox WNW
Nex
Loo
' I have a table with records that contain 250 fields. I have to check to see if each field i
' a zero. If they all are 0 I update a one position field called Tag. In the Variable Name Holdi
' I want to put the name of the field to check the contents of in the variable Name Hold it. Eac
' field starts with the characters WN and the number follows. WN01, WN02, WN03, WN04, etc. I actuall
' have 250 fields but just trying to test 25 to get it to work. I am having trouble with the Synta
' on the above code
Thank Yo
Len
Dim db As Databas
Dim rst As Recordse
Dim ChkByte As Byt
Dim wrkIndx As Byt
Dim HoldIt As Strin
Dim WNWN As Byt
Set db = CurrentD
Set rst = db.OpenRecordset("SELECT * FROM UNIVREC"
Do Until rst.EO
wrkIndx =
For wrkIndx = 1 To 2
If wrkIndx < 10 The
HoldIt = "WN0" & wrkInd
Els
HoldIt = "WN" & wrkInd
End I
WNWN = (rst!(= HoldIt)) ' This is where my problem is . WNWN should be 0 or a number from 1 to 129.
MsgBox WNW
Nex
Loo
' I have a table with records that contain 250 fields. I have to check to see if each field i
' a zero. If they all are 0 I update a one position field called Tag. In the Variable Name Holdi
' I want to put the name of the field to check the contents of in the variable Name Hold it. Eac
' field starts with the characters WN and the number follows. WN01, WN02, WN03, WN04, etc. I actuall
' have 250 fields but just trying to test 25 to get it to work. I am having trouble with the Synta
' on the above code
Thank Yo
Len