Link to home
Start Free TrialLog in
Avatar of synergyconsulting
synergyconsultingFlag for United States of America

asked on

error 3061

I have a simple update query, run from a form but does not contain form references, just table.fields.  This runs fine in my test environment but fails when I run it in the production environment.  I don't know of any difference in the two environments that would be related to this error (obviously, I'm missing something).   A very similar query runs fine just before this one.  I've tried removing the Where clause but the error  (3061, Too few Parameters, Expected 1) still occurs.  
Any suggestions will be greatly appreciated.
Thanks,
Brent
'Update table from imported data
   strSQL = "UPDATE [RouteCards_temp]" & _
         " INNER JOIN StreetSyncOutput ON [RouteCards_temp].iCustId  = StreetSyncOutput.CustomerNumber" & _
         " SET [RouteCards_temp].Sequence = StreetSyncOutput.Sequence," & _
         " [RouteCards_temp].StopSequence = StreetSyncOutput.StopSequence" & _
         " [RouteCards_temp].RouteName = StreetSyncOutput.RouteName" & _
       " WHERE  RouteCards_temp.icustid > 0 ;"
         
   db.Execute strSQL, dbFailOnError

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Since this is a difference between your Test and Production environments, have you ensured that any fields you may have added to the tables in your Test environment have also been added to the tables in your Production environment?

Missing fields are another cause of this error.
Same for table names.  Just ensure that the database table structure is identical in both environments in addition to the actual code or SQL.
Avatar of synergyconsulting

ASKER

I've requested that this question be deleted for the following reason:

I found my solution.  Production database had a typo in a related field.
<Production database had a typo in a related field.>

The comments here addressed that.
typo in field name in prod database.
"Well, since there are no Form references and not WHERE issue, almost leaves a Typo"