Two Questions

B

BillB

I'm use access 2000. I have two fields in my db that I want to modify.

The first is a Yes/No field. How do I toggle it to change all to either
checked or not checked Yes/No

The second, I have a field I just added to a table that has 2000 plus
records in it. The new field is a number field that is related to a new
table I just added called provinces. In that table are all Canadian
provinces. The new field at the end of my populated table is empty. How do I
add say "2" to all the new fields. The "2" would represent say Ontario in
the related provinces table.

Bill
 
F

fredg

I'm use access 2000. I have two fields in my db that I want to modify.

The first is a Yes/No field. How do I toggle it to change all to either
checked or not checked Yes/No

The second, I have a field I just added to a table that has 2000 plus
records in it. The new field is a number field that is related to a new
table I just added called provinces. In that table are all Canadian
provinces. The new field at the end of my populated table is empty. How do I
add say "2" to all the new fields. The "2" would represent say Ontario in
the related provinces table.

Bill

You can set all the check boxes to all Yes or all No by using an
update query:
To make them all Yes..

Update YourTable Set YourTable.CheckName = -1;
or to make them all No..

YourTable.CheckName = 0

Your second question is not clear to me as to what you expect. Perhaps
an example, including actual field names, would help
 
B

BillB

Thank fredg

My second question,

In table "tbl_list" I have just added a new field call "province" and in the
database I have added a new table called "tbl_Provinces". The table
"tbl_Provinces" has a relationship to "tbl_list" by "tbl_Provinces.Pro_ID"
related to "tbl_list.provinces".

Now that I have these created I need to update all the "tbl_list.provinces"
fields with the "tbl_Provinces.Pro_ID". In this case all 2000 entries in the
database need to be related to the Provinces of Ontario which is
"tbl_Provinces.Pro_ID" 2

Does that make any better sence?

Bill

Bill
 
D

Douglas J. Steele

If you're trying to set all 2000 records to the same value, it's a simple
UPDATE statement:

UPDATE tbl_list SET province = 2
 
F

fredg

Thank fredg

My second question,

In table "tbl_list" I have just added a new field call "province" and in the
database I have added a new table called "tbl_Provinces". The table
"tbl_Provinces" has a relationship to "tbl_list" by "tbl_Provinces.Pro_ID"
related to "tbl_list.provinces".

Now that I have these created I need to update all the "tbl_list.provinces"
fields with the "tbl_Provinces.Pro_ID". In this case all 2000 entries in the
database need to be related to the Provinces of Ontario which is
"tbl_Provinces.Pro_ID" 2

Does that make any better sence?

Bill
** snipped **

Let me state it back to you and see if I've got it correct.

You wish to change an existing field in your table
(tbl_list.provinces) so that ALL the records = 2

If so, use the Update query again.
Update tbl_list Set tbl_list.provinces = 2;

All the records will have the same value in that field.
 
Top