Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Date Picker not working
Robert Freeman 
      
2 years ago
Hi all. Can someone please point me in the right direction.... I have a problem with Date Picker not working in two form fields. Based on a table.
The properties are all set to show Date Picker and defaults are all set to '=Date()'. Nevertheless Date Picker refuses to show. I've tried calling the Date Picker with vba (DoCmd.RunCommand acCmdShowDatePicker) and now I get a vba error - Runtime Error 2046 Command or Action show Date Picker is not available now. Any pointers would be appreciated. Many thanks.
Sami Shamma  @Reply  
             
2 years ago
please send an image of Format property of the form's date field that is not working.
Robert Freeman OP  @Reply  
      
2 years ago

Richard Rost  @Reply  
           
2 years ago
Double check that the field type in the underlying table is Date/Time.
Robert Freeman OP  @Reply  
      
2 years ago
Yes, they are both set to Date/Time. I've also tried adding in the default =Date() in each of the table field properties as well, to no effect.
Sami Shamma  @Reply  
             
2 years ago
Add a date format for example yyyy-mm-dd in the first property 'Format' as in the image above.
And try it again.
Kevin Robertson  @Reply  
          
2 years ago
Add a date format for the text box. This should force the Date Picker to show.
Richard Rost  @Reply  
           
2 years ago
What's the recordsource? Table or query?
Robert Freeman OP  @Reply  
      
2 years ago
Hi guys. Thanks for the suggestions - adding the date format to the form properties worked. The date picker shows fine now. Strangely though FYI I've had to remove the vba that called the Date Picker - that still throws out the vba error. Richard, the form creates the start and end date (as per your video - 'Between Dates') which are then stored in a table, which is then called by a query. The form is therefore, I guess, based on a table.
I have a supplemental quick question for you please - another field on the form just requires the input of a year - usually the current one. It's easy to input the year but how do I populate the field with the current year automatically allowing for it to be changed if necessary.
Again, thanks for the solution to the Date Picker problem.
Regards. Bob.
Robert Freeman OP  @Reply  
      
2 years ago
I answered my own supplemental question -  =DatePart('yyyy',Date())
Richard Rost  @Reply  
           
2 years ago
Yep - and put that in the Default Value field so the user can change it.

You could also use =Year(Date())

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/7/2026 1:14:53 PM. PLT: 0s