Update records

A

Antonio

Hello, all....
I am looking for some help to update numerous records at
once. I have one main account that has multiple sub-
accounts. When this main account renews the subscription
to one of our products, the subscription expiration date
automatically updates and I would like to update the
expiration date of all the sub-accounts. Any
suggestions? Thanks, Antonio
 
M

[MVP] S. Clark

Run an Update query against the Child table.

Typically, there is nothing tricky about this, but you'd better post your
table structures just to safe. I have a feeling your about to learn about
normalization the hard way.

--
HTH,

Steve Clark, Access MVP
FMS, Inc.
Professional Solutions Group
http://www.FMSInc.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Is your Access database too slow?
Are you ready to upgrade to SQL Server?
Contact us for optimization and/or upsizing!
http://www.FMSInc.com/consulting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
J

John Spencer (MVP)

If the sub-accounts all have the same expiration date as the main account, then
why not just use the expiration in the main account and not even have a field to
store the expiration in the sub-accounts?

Assuming the sub-accounts are linked to the main account in some manner, you
should be able to use an update query. Without knowing your structure it is
hard to give you an absolute answer, but....

UPDATE tblSubAccounts INNER JOIN tblMainAccounts
On tblSubAccounts.MainID = tblMainAccounts.MainID
SET tblSubAccounts.Expiration = tblMainAccounts.Expiration
WHERE tblSubAccounts.MainID = 123

123 would be the Acount Number of the Main Account.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top