Duplicate data

G

Guest

Hi,

I'm using Access XP. I have a database with several tables, my Main table
has names, company names, addresses, etc. One of my child tables tracks
whether or not this person or company would receive a holiday card. In my
Holiday Card table, I also have address fields because there are times when
we send the card to a home address for the client vs. the business address.
Usually, this holiday card address is the same as the address stored in the
Main table.

Is there a way I can create a button that would transfer the address info
from the Main table into the Holiday Card mailing table? We run the lables
from the Holiday Card table. Thanks for the help!
 
S

Steve Schapel

Cissy,

Make a Query that includes both tables, suitably joined on whatever
field is the basis of the relationship between them. Then make it into
an Update Query (select Update from the Query menu), and in the Update
To row of the query design grid, in the Address field from the Holiday
Card table, put the equivalent of [MainTable].[Address]. If you want to
do this for the current record on the form, in this same query you can
put the equivalent of...
[Forms]![NameOfYourForm]![YourIDField]
.... in the Criteria of your primary key field in the query. And then,
just make a macro using the OpenQuery action to run this Update, and
assign the macro to the On CLick event property of a Command Button on
your form.
 

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