Hi all,
I have a little question
I have to make a few insert queries based on values
the values are stored in fields with name TempCount1, TempCount2, TempCount3 and so on
Now I'll try something like:
While Not rst.EOF
strSQL = "INSERT INTO tblDetails([subLocRef],[artRef],[aantal],[verk_prijs])" & _
" VALUES(" & subKey & "," & rst.Fields("artikelRef"
& "," & TempCount & rst.Fields("ID"
& _
",'" & rst.Fields("VVP"
& "')"
DoCmd.RunSQL strSQL
rst.MoveNext
Wend
THe ID field in the rst correnspond with numbers 1,2,3, and so on.
The problem: The compiler asked for an unknown variable TempCount.
This is true, I need the public stored variable, tempcount1, and so on. How can I handle this problem?
thnx in advance,
Gerard
I have a little question
I have to make a few insert queries based on values
the values are stored in fields with name TempCount1, TempCount2, TempCount3 and so on
Now I'll try something like:
While Not rst.EOF
strSQL = "INSERT INTO tblDetails([subLocRef],[artRef],[aantal],[verk_prijs])" & _
" VALUES(" & subKey & "," & rst.Fields("artikelRef"
",'" & rst.Fields("VVP"
DoCmd.RunSQL strSQL
rst.MoveNext
Wend
THe ID field in the rst correnspond with numbers 1,2,3, and so on.
The problem: The compiler asked for an unknown variable TempCount.
This is true, I need the public stored variable, tempcount1, and so on. How can I handle this problem?
thnx in advance,
Gerard