skiphooper
Registered User.
- Local time
- Today, 05:32
- Joined
- Nov 29, 2000
- Messages
- 76
Hi everyone,
This is part of the code I need to cut down.
' *****************************
Private Sub updatesub1()
int_loop = 1
rstID.AddNew
rstID!stukey = txtStuNum
rstID!SUBCD = int_I
rstID!I001 = Mid(txtsub1, int_loop, 1)
int_loop = int_loop + 1
If int_loop > Val(txtlensub1) Then Exit Sub
rstID!I002 = Mid(txtsub1, int_loop, 1)
int_loop = int_loop + 1
If int_loop > Val(txtlensub1) Then Exit Sub
rstID!I003 = Mid(txtsub1, int_loop, 1)
int_loop = int_loop + 1
If int_loop > Val(txtlensub1) Then Exit Sub
' ect ect ect
' thru
rstID!250
rstID.update
end sub
' ********************************
The code works, but my question is:
How can I loop thru the field names and still
update each field from 1 to 250.
Thanks
Skip
[This message has been edited by skiphooper (edited 02-06-2002).]
This is part of the code I need to cut down.
' *****************************
Private Sub updatesub1()
int_loop = 1
rstID.AddNew
rstID!stukey = txtStuNum
rstID!SUBCD = int_I
rstID!I001 = Mid(txtsub1, int_loop, 1)
int_loop = int_loop + 1
If int_loop > Val(txtlensub1) Then Exit Sub
rstID!I002 = Mid(txtsub1, int_loop, 1)
int_loop = int_loop + 1
If int_loop > Val(txtlensub1) Then Exit Sub
rstID!I003 = Mid(txtsub1, int_loop, 1)
int_loop = int_loop + 1
If int_loop > Val(txtlensub1) Then Exit Sub
' ect ect ect
' thru
rstID!250
rstID.update
end sub
' ********************************
The code works, but my question is:
How can I loop thru the field names and still
update each field from 1 to 250.
Thanks
Skip
[This message has been edited by skiphooper (edited 02-06-2002).]