By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,955 Members | 1,756 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,955 IT Pros & Developers. It's quick & easy.

Seeking SQL to update tblCustomers.Called to True

P: n/a
MLH
An attached table named tblCustomers (but without the capital C)
is attached to my Access database. The table is a remote MySQL
table. I can read it and even make some changes to its data
manually in table view.

I would like an example PassThrough query's SQL to show how
to update [tblcustomers].[Called] to True. Thanks.
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Simply build a query in the query builder. Make it a pass-through query.

update tblCustomers set Called = True

In fact, for the above query, since it is so simple, you don't even have to
make it pass-through.

Save the query, lets call it qrySetTrue

Now, in code to run the above, just use.

docmd.RunSql "qrySetTrue"
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pl*****************@msn.com
http://www.attcanada.net/~kallal.msn
Nov 13 '05 #2

P: n/a
"Albert D. Kallal" <Pl*******************@msn.com> wrote in
news:2IG2d.454436$gE.279517@pd7tw3no:
Simply build a query in the query builder. Make it a
pass-through query.

update tblCustomers set Called = True

In fact, for the above query, since it is so simple, you don't
even have to make it pass-through.

Save the query, lets call it qrySetTrue

Now, in code to run the above, just use.

docmd.RunSql "qrySetTrue"


Excactly what the Original Poster (OP) asked. but in the interest
of anybody searching through the archives, we should explain that
this will set the called field true for every record in the
tblCustomers. A more suitable query would include a WHERE clause
that takes the primary key of the OP's current record and limit
the change to that one.

--
Bob Quintal

PA is y I've altered my email address.
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.