what is wrong with this code?
the code errors at the set rstFUP(A) = ... line
it tells me "runtime error 3061, too few parameters. Expected 1"
why? can I not use an array in this way?
Code:
Dim initials As String, e_SIG As String, queryFUP As String
Dim rstFUP(4) As Recordset
Set rstMSG = CurrentDb.OpenRecordset("defaultemailmsg")
initials = "AM"
e_SIG = vbCrLf & _
vbCrLf & _
vbCrLf & _
vbCrLf & _
"Kind regards," & vbCrLf & _
vbCrLf & _
"Awhi McLachlan" & vbCrLf & _
"AIMS Supporter Services/N.E.S.T." & vbCrLf & _
"Ph (09) 4376694"
For A = 1 To 4
queryFUP = "followup_email" & A
Set rstFUP(A) = CurrentDb.OpenRecordset(queryFUP)
With rstFUP(A)
e_SUB = "Follow up on invitation to join Northland Electricity Emergency Helicopters Supporter Family"
.MoveFirst
Do Until .EOF
e_ADDY = !email
f_TYPE = (10 * !email_followup_type) + ![1stemailfeasturesize]
Select Case ![1stemailfeaturesize]
etc etc
the code errors at the set rstFUP(A) = ... line
it tells me "runtime error 3061, too few parameters. Expected 1"
why? can I not use an array in this way?
Comment