473,659 Members | 2,671 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Change Default value

37 New Member
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 6259
missinglinq
3,532 Recognized Expert Specialist
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 New Member
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,568 Recognized Expert Moderator MVP
@sillyr
In what case is this Sally?
On a form or in datasheet view of the table itself?
Jan 26 '09 #4
sillyr
37 New Member
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,568 Recognized Expert Moderator MVP
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
2397
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 say I have values selected for all three pull down menus. When I change the first "top-level" menu I want to reset both the second and third menus to the "default" state.
5
1429
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 to change F2 at anytime if needed and changes in F2 will not affect F1. Problem #2:
1
2788
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 can change this default value while preserving the project name? Thanks in advance
3
5005
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 data in the text boxes. Then an "update" button saves the data back to the database. What is the best way to change several properties on most of the textbox controls on the form when the "modify" button is clicked? (e.g. make them editible (and...
7
2381
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 can be deduced from some means, isn't it ? The small investigation ( on DB2/LINUX 8.2.3 ) shows these values are compressed: - for numbers (integers,decimals): ZEROs and NULLs (if nullable). - for strings (graphic) : sequences of spaces of any...
1
6031
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 <a href="#" title="Change Font Size" onclick="cambia_font_size(2);">A</a>
8
10782
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 header name. then i will set this value in my html page .... using META tag with HTTP-EQUIV and CONTENT value.
5
1867
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 to add an ability to my program. In fact I want to have an Icon that change, when a user change the value of a control of form such as textbox , radiobox, grid. as you know the most famous and important editors such as PSPAD or
1
9615
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 close the form because then the message pups up "MS Office Access can't change the work directory to I:\ " If I change it to D:\ I can close the form but by opening the form again the field is still showing I:\.
0
8427
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8330
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8850
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8746
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7355
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4334
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1975
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1737
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.