Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

update a field

0 views
Skip to first unread message

JT

unread,
Nov 14, 2007, 10:46:03 AM11/14/07
to
Is it programmatically possible to update a field in a table? I have a
single table with 2 fields. 1 field is "group" and the second field is
"branch". There is a single record in this field. These fields contain the
version number. As we release new versions I need to update the database for
each cost center. I would like a way to do this in a macro instead of going
in each database to change the version number.

Any help getting started would be appreciated. Thanks for the help....
--
JT

Alex Dybenko

unread,
Nov 14, 2007, 11:01:33 AM11/14/07
to
Hi,
make an update or append query and run it in macro or VBA

--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com

"JT" <J...@discussions.microsoft.com> wrote in message
news:2C92B9C3-5D21-4687...@microsoft.com...

J_Goddard via AccessMonster.com

unread,
Nov 14, 2007, 1:44:01 PM11/14/07
to
Hi -

The description of your table seems strange. You said there are two fields
in the table, "Group" and "Branch". Each *record* in the table therefore
contains these two fields, so saying "There is a single record in this field"
makes no sense.

What data is the table supposed to contain? If you want to track what
version number each Branch/Group has, then you a third field in the table -
VersionNumber.

You can update the table with SQL, for example:

mySQL="UPDATE MyTable set VersionNumber = " & NewVersionNumber &
" WHERE Branch = '" & BranchName & "' AND Group = '" & GroupName & "'"

db.execute SQL

Please clarify if I don't have my assumptions right.


HTH

John

--
Message posted via http://www.accessmonster.com

0 new messages