update query will not run

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Below are 2 examples of queries I am running based on the me.filter of the
form. The last line of both queries comes from the me.filter, I then replace
any * with %. The first one works when I run db.Execute strQry,
dbFailOnError the second one does not. I have checked the query and the
toinfo field and the todescr fields are both in the query and both are text
fields. I don't understand why I can filter on one field and the update
works, but if I filter on the second one it will not. I am trying to let the
user filter the form and I only update items that are still showing on the
form. Any help would be greatly appreciated. I am getting the last line on
both queries below from the me.filter of the form and replacing * with %.

update qryQCircToFrom set idtoinfo = 6368, circuit = 'z3413-BAT-0001' & '-'
& voltage where (((idtoinfo) = 6368) and ((circuit) like 'z%')) and
((qryQCircToFrom.ToInfo Like "%BAT-0002"));

update qryQCircToFrom set idtoinfo = 739, circuit = 'z3413-BAT-0001' & '-'
& voltage where (((idtoinfo) = 6368) and ((circuit) like 'z%')) and
((qryQCircToFrom.ToDescr Like "%ENCLOS%"));
 
Hi,


when you say it does not work, you mean it produces an error or nothing get
updated? If, instead of updating, you try to get a SELECT, do you still see
no records? (or the same error occur) ?

Are they saved queries or you use string of these SQL statements to be
executed?


You are sure none of the implied field is a MEMO type?



Vanderghast, Access MVP
 
Back
Top