470,856 Members | 2,520 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,856 developers. It's quick & easy.

Change Default value

Hi- I'm using Access 2007. I wanted to change a default value for a field that previously had no default value. I though it would be easy- just set the default value setting to the number t hat I would like. There was originally no default value and now I would like t he default value to be 12. The data type is number, long integer. The field display control is a combo box, the row source type is Table/Query and the row source is another table that on the form is a drop down box where the user selects a value. I have other fields that have the same formatting that have default values that I can change that work. These fields were given default values when I created the table. I also tried to change the default value on the form, but have had no luck. Thanks for any help
Jan 21 '09 #1
5 6092
3,532 Expert 2GB
So, just to restate; you've tried opening the table in Design View and add the Default and you've tried adding the Default in the form Design View thru the Properties sheet? And when you add a new record there is no Default?

First off, you do know that the new Default will only affect new records, right? Old records with no value won't have the Default entered.

Ther are reports of other Properties not being retained in Access 2007 unless you enter them, click on another property, then exit. I've seen no report of this happening with Default Values, but it might be worth trying.

Linq ;0)>
Jan 21 '09 #2
Yes- what you said is correct sorry I didnt state that, but I did do everything in the design view for both the table and the form. When I enter a new record the default value is not present. With the other fields that I entered a default value when I created the table and subsequent form the default values are present for all records in the table and also always present on the form. The one field where the default value is changed on a regular basis has no errors when the default value is changed. The new default value is present when you view the table in the datasheet view even when no new data has been entered.
Jan 21 '09 #3
32,311 Expert Mod 16PB
In what case is this Sally?
On a form or in datasheet view of the table itself?
Jan 26 '09 #4
Hi- It was not working on either the table or the form, but I did some online searching and figured out a way to fix it. On the property sheet of the form in the default value I put [cmbdiscard818].[ItemData](5). Thanks
Jan 26 '09 #5
32,311 Expert Mod 16PB
Cool - and thanks for posting your answer.

I agree that setting the default of the control is better than changing the table design in cases such as this.
Jan 26 '09 #6

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

7 posts views Thread by Konstantin Andreev | last post: by
1 post views Thread by mIDO | last post: by
1 post views Thread by Simon van Beek | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.