467,222 Members | 1,405 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

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

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

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
  • viewed: 4017
Share:
3 Replies
NeoPa
Expert Mod 16PB
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
Expert Mod 16PB
A pleasure. Glad that you managed to get it working :-)
Nov 14 '10 #4

Post your reply

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

Similar topics

reply views Thread by Q. John Chen | last post: by
2 posts views Thread by Enosh Chang | last post: by
4 posts views Thread by erick-flores | last post: by
reply views Thread by Adict | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.