Update Query

  • Thread starter Thread starter ladybug via AccessMonster.com
  • Start date Start date
L

ladybug via AccessMonster.com

I have never used an update query...I was wondering if someone could walk me
through it.

I have a table with a list of programs. I have another table that has two
fields: Program and Phone #.
When a new program is added to the first table I would like to then run an
update query that automatically adds the new program to the second table and
enters (000)000-0000 as the phone # for that program.

Thank you so much!
 
This would not be an update query, it would be an append query.
An update query changes values in existing records.
An append query adds new records to an existing table.

Create a new query in the query builder.
Select the first Table.
Select the two fields you want to put in the second table.
Change the query type to Append.
Enter the name of the second table in the prompt.
Put the field names of the second table in the append to row that correspond
to the fields you have in the first table.
Give it a name.
Save it.
 
I apoligize, but that did not work.
If I select the first table which is the Program table there is only one
field (Program).
Your explanation says to select the TWO fields you want to put in the second
table.
That is where you lost me...you might need to dumb it down for me :)
This would not be an update query, it would be an append query.
An update query changes values in existing records.
An append query adds new records to an existing table.

Create a new query in the query builder.
Select the first Table.
Select the two fields you want to put in the second table.
Change the query type to Append.
Enter the name of the second table in the prompt.
Put the field names of the second table in the append to row that correspond
to the fields you have in the first table.
Give it a name.
Save it.
I have never used an update query...I was wondering if someone could walk me
through it.
[quoted text clipped - 6 lines]
Thank you so much!
 
Since you mentioned the phone number, I assumed the phone number was in the
first table. Where do you plan to get the phone number?
If you are talking about just putting the literal text (000)000-0000 in the
second table, you can just enter "(000)000-0000" (Including the quotes)

ladybug via AccessMonster.com said:
I apoligize, but that did not work.
If I select the first table which is the Program table there is only one
field (Program).
Your explanation says to select the TWO fields you want to put in the second
table.
That is where you lost me...you might need to dumb it down for me :)
This would not be an update query, it would be an append query.
An update query changes values in existing records.
An append query adds new records to an existing table.

Create a new query in the query builder.
Select the first Table.
Select the two fields you want to put in the second table.
Change the query type to Append.
Enter the name of the second table in the prompt.
Put the field names of the second table in the append to row that correspond
to the fields you have in the first table.
Give it a name.
Save it.
I have never used an update query...I was wondering if someone could walk me
through it.
[quoted text clipped - 6 lines]
Thank you so much!
 
Back
Top