473,503 Members | 9,912 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why is default value assigned for a Date field not working?

1 New Member
I haven't experienced this problem of assigning Date or Now to a date field's default property so the form shows the current date. Of course, this is to help ease data entry for the user.

The field "DateOfDeterm" is a Date/Time field. On the form the default property of this field is set to Date. When form opens it does not show current date. Field is formatted as "Short Date".

Am I missing a setting somewhere? This works in other applications I've completed. I also tried using VBA to assign the value but I get a "cannot assign a value to this object" error

All help is greatly appreciated!

Bryman
Nov 12 '10 #1
3 4749
NeoPa
32,557 Recognized Expert Moderator MVP
It's hard to know what you're really saying. There is no .Default property. There is a .DefaultValue property. If you try to assign Date to this property it won't work (It's not possible). It converts it automatically to "Date". On the other hand, if you were to assign to it Date(), then it should work.

I don't know what you've actually done, but if you've done it correctly, and it's not working for you, then something else is wrong that you haven't shared.
Nov 13 '10 #2
I did use the .DefaultValue property. Sorry for the lack of a meaningful explanation. And I did use the Date() assignment. Don't know what was different with this field because it worked after I deleted the field from the table then added another date field to the table. After setting the .DefaultValue property to Date() it worked!

Thank you for your help.
Nov 13 '10 #3
NeoPa
32,557 Recognized Expert Moderator MVP
A pleasure. Glad that you managed to get it working :-)
Nov 14 '10 #4

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

Similar topics

0
4198
by: Q. John Chen | last post by:
Using MySQL control center, I created a MySQL database table with a column of Date type. It always give the a Default value (0000-00-00) even null is allowed. I tried remove the default value and...
1
1737
by: garyusenet | last post by:
Using VB Express and SQL. I have an sql database. what function gives me todays date and time? and do i enter it in the 'default' property for the column in the database? i've tried now()...
2
3842
by: confused | last post by:
Hi, I want to assign a default value of DBNull.Value to my stored procedure parameter, but also have the ability to overwrite it, so: SqlParameter param = new SqlParameter...
2
2777
by: Enosh Chang | last post by:
Hi all, I have a question about optional parameter. If I use optional parameter, it ask me to set default value for it. How can I set default value for Date parameter? Thanks! Best Regards
4
2246
by: erick-flores | last post by:
Hello I am trying to setup a default value for a field in a form. The field is a text box. I need to setup the default value to: 0.000. And whenever the user is trying to enter a value for this...
1
1444
by: Olaf Rabbachin | last post by:
Hi folks, I'm looking for a way of retrieving the default-value of a table's field within an Access 2003 MDB. Any hints on how to accomplish this from ASP.Net? Thanks, Olaf -- My .02:...
3
5097
by: MLH | last post by:
I have a table named tblDoItems. It has a text field named . There is no default value property setting at the table level. I have a query named qryAdminDoList based solely on the table that looks...
2
4220
rsmccli
by: rsmccli | last post by:
Is there any benefit to having 0 instead of null as a default value for combobox/lookup fields? Just wondering because I find the default 0s annoying and am thinking about going through and deleting...
1
2824
by: klausdh | last post by:
Hi all, I am just about to migrate a database from mdb to adp format - and experienced a real difficulty in retrieving a table field's default value by VBA code (using the ADODB 2.8 Library). In...
3
2137
by: viki1967 | last post by:
Hi all. I have this: <input type="text" name="agg" size="30" value="---" readonly> <select size="1" name="provv" onchange="var cc = this.options.value;...
0
7095
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
7294
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,...
0
7361
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...
0
7470
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5602
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,...
0
4693
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...
0
3183
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1523
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
749
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.