Results 1 to 2 of 2
2002-07-22, 06:41 #1
- Join Date
- Feb 2002
- Thanked 0 Times in 0 Posts
default value in a table (Access 2000)
I have a field called "stock" in the table called " Products". At first i didnt know that i have to put the default value to 0, and therefore i have a lot of products
with a default value not put to zero.Now after i know that,each new product has a default value of O. But for all the products before that i have to put the o manually.
Is there any code to put the default values of the products to 0. Somethink like that: table products, field stock, defaultvalue= 0 ??
2002-07-22, 07:13 #2
- Join Date
- Mar 2002
- Thanked 28 Times in 28 Posts
Re: default value in a table (Access 2000)
You can use an update query to do this:
<UL><LI>Create a new query, based on the Products table.
<LI>Add the Stock field to the query grid.
<LI>In the criteria row, under Stock, enter
<LI>Select Query/Update Query.
<LI>A new row appears in the query grid, labeled something like "Change to" (I don't know the exact wording in English).
<LI>In this row, under Stock, enter
<LI>Now, run this query by clicking the ! button on the tool bar or selecting Query/Run. Probably, you'll be asked to confirm changes.
<LI>You can close the query without saving it, unless you want to keep it as an example.[/list]HTH,