By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,493 Members | 1,179 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,493 IT Pros & Developers. It's quick & easy.

How to set Calendar Date (was Access 2003)

P: 8
I am tring to get a calendar control to just update to the current date when the form is opened, But for some reason cant get it to work. The calendar is always on the same date. This is what I put in.......

Private Sub Calendar6_Updated(Code As Integer)
Value Calendar6 = Date
End Sub

Can you please help
Jul 20 '07 #1
Share this Question
Share on Google+
4 Replies


missinglinq
Expert 2.5K+
P: 3,532
This should do it:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Load()
  2.  Calendar6.Value = Date
  3. End Sub
  4.  
You could actually just use

Calendar6 = Date

as .Value is the Default property for controls that hold values.

Welcome to TheScripts

Linq ;0)>
Jul 20 '07 #2

P: 8
This should do it:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Load()
  2.  Calendar6.Value = Date
  3. End Sub
  4.  
You could actually just use

Calendar6 = Date

as .Value is the Default property for controls that hold values.

Welcome to TheScripts

Linq ;0)>
I tried it on a copy and it worked but on the usable file it will not work. I get an error......
Ambiguous name detected.
Jul 23 '07 #3

P: 8
I tried this with your suggestion and it works on a copy of the file but not on the original. Im not sure why. I get an error that states Ambiguous file name Form_Load()
Jul 23 '07 #4

missinglinq
Expert 2.5K+
P: 3,532
Check and see if you have 2 subs called Sub Form_Load. If so, you need to combine the code from each into one of the subs and then delete the other one.

Linq ;0)>
Jul 23 '07 #5

Post your reply

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