martinhough
Registered User.
- Local time
- Today, 03:26
- Joined
- Feb 2, 2011
- Messages
- 16
Hi
I have a routine that appeared to work fine in ms Access 2003 but since being upgraded to 07 now prompts me for the value of a variable (testid). When I toggle the section concerned the variable seems to be holding the correct value, but is still prompting me for one. Extract of code in question posted below. Red section is where it breaks, prompting me for 'testid' value.
Many thanks
testid = rsdetails("ProductID")
SQL2 = "UPDATE ProductOrders SET ProductOrders.ProductProcessed = True WHERE (((ProductOrders.ProductID)= [testid]));"
If rsdetails("product authorised") = -1 And rsdetails("productprocessed") <> -1 Then
DoCmd.SetWarnings False
DoCmd.RunSQL SQL2
Recalc
' DoCmd.OpenQuery "ProductsProcessedUpdate", acViewNormal
DoCmd.SetWarnings True
End If
rsdetails.MoveNext
Loop
rsdetails.Requery
I have a routine that appeared to work fine in ms Access 2003 but since being upgraded to 07 now prompts me for the value of a variable (testid). When I toggle the section concerned the variable seems to be holding the correct value, but is still prompting me for one. Extract of code in question posted below. Red section is where it breaks, prompting me for 'testid' value.
Many thanks
testid = rsdetails("ProductID")
SQL2 = "UPDATE ProductOrders SET ProductOrders.ProductProcessed = True WHERE (((ProductOrders.ProductID)= [testid]));"
If rsdetails("product authorised") = -1 And rsdetails("productprocessed") <> -1 Then
DoCmd.SetWarnings False
DoCmd.RunSQL SQL2
Recalc
' DoCmd.OpenQuery "ProductsProcessedUpdate", acViewNormal
DoCmd.SetWarnings True
End If
rsdetails.MoveNext
Loop
rsdetails.Requery