473,386 Members | 1,598 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Change Default value

37
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 6239
missinglinq
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
sillyr
37
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
NeoPa
32,556 Expert Mod 16PB
@sillyr
In what case is this Sally?
On a form or in datasheet view of the table itself?
Jan 26 '09 #4
sillyr
37
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
NeoPa
32,556 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

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

Similar topics

6
by: Bonge Boo! | last post by:
This has got to be obvious, but I can't make it work. I have a form called with 3 pull down menus. They are linked to a database which generates the values for the <SELECT? Pull-downs. Lets...
5
by: perryche | last post by:
Problem #1: I have a form, which says, has 2 fields: F1 & F2 (both Dates). I want to be able to change F1 and F2 will change to be the same as F1 in the codes. However, I will still be able...
1
by: gan | last post by:
I created a ASP.NET web setup project with the project name "Setup". I noticed that this name will be used as the default Virtual Directory name during deployment. I'd like to know whether we...
3
by: Tom | last post by:
I am writing a Visual basic .Net database application. There are many forms that first let you select and look at a DB record and then when you click a "modify" button you are allowed to change...
7
by: Konstantin Andreev | last post by:
Well known, during "CREATE TABLE" we could optionally specify "COMPRESS SYSTEM DEFAULT" and "VALUE COMPRESSION" options. The main idea about these statements is : NOT to keep on disk the values that...
1
by: mIDO | last post by:
Hello, I have developed a script that change the font size in css, but only the attribute "font-size" on the body tag, not change the entire active stylesheet. When i click to change the size...
8
dmjpro
by: dmjpro | last post by:
i want to change the default connection time-out value. which is by default 5 minutes. i want to change this value. actually this value is set against a HTTP-HEADER. i just want to know that...
5
by: raha | last post by:
hi. Is there any body to help me? I am writing a web program. I have some forms. each form have some controls and users can edit the controls. finally they can save their forms. I would like...
1
by: Simon van Beek | last post by:
Dear reader, Under | Tools | Options | the form Options will open. Under the tab you find the field "Default database folder". By opening the form this field shows on my pc I:\. I can't...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.