Hi all, I have a problem when running this vba code:
when it reached the bold part, the running will stop and show this error
"Run-time error '2950':
Reserved Error"
But the error won't come if open the Access file while running the code.
Anyone could help me with this problem?
Thank you
Code:
SetRS1 "Select * From Q_SdbK Where Sh_No Between '" & (ship1.Value) & "' AND '" & (ship2.Value) & "'"
'Rs1.MoveNext
While Not Rs1.EOF
a = Rs1(0)
SetRS2 "Select * From Q_PrintKA Where Shp_No ='" & (a) & "'"
[B] end = DCount("*", "Q_PrintKA", "Shp_No ='" & (a) & "'")
[/B]
"Run-time error '2950':
Reserved Error"
But the error won't come if open the Access file while running the code.
Anyone could help me with this problem?
Thank you