Printable Version of Topic

Click here to view this topic in its original format

UtterAccess Forums _ Access Date + Time _ Coding Help For New Date Picker Pop Up Form

Posted by: Gerrit Oct 18 2019, 12:00 PM

In the process of finally getting shot of our dependence on the MSCAL.OCX in our machine shop management software. Originally the software was started in Access 97 and has been continuously upgraded. Users do not like the cumbersome and puny build in date picker in Access so I delved into my archive of Access samples and found a nice Date Picker pop up form dating back to 2011. Many thanks to the original creators for the sample.

Got it to work pretty good except I cant get the coding right to get the FireOffDateValue function attached to individual day buttons to work. Everything works fine if the OK button is used but ideally I would like to hide the OK button and use the day buttons to fire the date back to the primary form.

Am no coding wizard (more a UI and process flow designer) and wonder if someone could help with the final bit of coding.

We use mainly start and finish dates on data entry forms (Quotes, Job Sheets, Invoice Statements, etc.) to enable production scheduling. Typically on say a job sheet as per the attached screen grab.

Wohoo, my first ever post in UtterAccess. ( 114.21K ): 19

Posted by: theDBguy Oct 18 2019, 12:15 PM

Hi. Welcome to UA! welcome2UA.gif

Try replacing

Call FireOffDateValue


Me.myDate = DateSerial(Me.myYear, Me.myMonth, Me.myDay)
Call cmdOk_Click

Posted by: arnelgp Oct 18 2019, 12:19 PM

the Attached form is not on db.

Posted by: Gerrit Oct 18 2019, 12:36 PM

No, the screengrab was only posted to show where the start day and finish day work on a form in our software. It is immaterial in regards the pop up date picker example.

Posted by: Gerrit Oct 18 2019, 12:38 PM

Thank you. Will give it a try.

Posted by: Peter Hibbs Oct 18 2019, 01:03 PM

Hi Gerrit,

Perhaps this will do what you want.

Peter Hibbs.

Posted by: Gerrit Oct 18 2019, 02:36 PM

Hi Peter,

You have a most excellent date picker. I did a survey of our software users in their preference for what date picker they preferred.

The inbuilt Microsoft one, your one and the pop up form one.

They all preferred the pop up form one. And as the consumer/customer/user is always right (listening Microsoft?) proceeded with the development of the pop up form.

Reasons for preference for the pop up form were

1- the ability to "see" and use the months selection without needing to use an extra click to open the drop down combo box. More intuitive when needing to change months.

2- size, having a pop up form with the same size font/colouring and uncluttered layout as the primary form won hands down. Harder on the eyes to have to refocus on smaller fonts and back to the primary form fonts after using the inbuilt access or your, date pickers. Have some more development work to do on the pop up date picker form to finalise this.

3- uncluttered workspace. Also to do with size, but form designers really need to think about layout, "white space" and flow. There is a reason advertising creators utilise "white space". Easier on the eyes and promotes thinking and connective flow from one item to the next. You don't have to do all the work on one form.

4- the un-intuitive method to open the Access or your date pickers. Intuitively you want the users to click inside the field box they want to change as they would do with every other data entry operation. Both Access and yours are counter intuitive by having to click an icon outside the field box to open the date picker. We continue the practice for clicking inside a date field to open a date picker (when using MSCAL.OCX) to the now new, pop up date picker form. Sure it may be an easy to learn to see a date field click inside it than move your curser and click on the date picker icon (which only appears after you click in the date field). Surely it is easier just to open a date picker as of old by a single click inside a date field box?

One of the reasons I dont have ribbons (even custom ones) on my forms is to simplify layout and promote easier use of the software. I utilise the top 20mm of each form to create "menu bars" applicable to that form or a subset of forms. Sure it is a lot of cutting and pasting when you have 40 odd primary forms but it so much more intuitive than tabbed ribbons.

Posted by: Peter Hibbs Oct 18 2019, 03:05 PM

Hi Gerrit,

OK, fair enough and good luck with the project.


Posted by: Gerrit Oct 18 2019, 04:05 PM

The DBGuy;

Perfect, worked 100% You are a legend, thank you.

Only 42 lines of code to highlight and paste in your code.


Posted by: AlbertKallal Oct 18 2019, 06:14 PM

I have a nice little date picker that should do the trick for you.

As for ribbons?

Actually, I am a big fan of ribbons. They have high usability when done right. While most “menu” bars group by function, ribbons when done right are grouped by “task” at hand. So they require more thought, but are a welcome approach and are not just simply a replacement for menu bars.

And for most forms, a tabbed ribbon should not be required unless you have a “ton” of functionally in that ribbon. (so a straw argument that custom ribbons need tabs – they should not). A ribbon requiring tabs means you “really” have a feature rich application. But then again you can context switch to the tab at hand, and then no drill down need occur like menu bars anyway.

Anyway, as for the calendar popup?

Much agree that a “button” beside the control uses up space (but, if you have the space, then I like this choice). And in Access the little calendar icon only shows when in the field.

As for a double click being a industry standard?

Outlook, Quick Books, Simply Accounting (now sage) don’t use double click for dates. So I would NOT claim this is a wide spread industry standard. And .net applications don’t work this way either. And two of the best (and widespread) tool makers for web and desktop (DevExpress and Telerik) don’t do this either.

I maintain several commercial applications (one written in .net – and quite widely used in the print industry).

And again none of these applications have adopted the double click on dates either. Same goes for at least 3 different accounting packages I worked with.

So, I am rather hard pressed to think of what mainstream software works this way? Accounting packages don’t, nor does web applications, nor does Excel, Office, and all of the commercial applications I currently use or maintain don’t either.

If you have some “wide spread” or “wide” used commercial application that works this way, I am all ears? (I assume there are some – but I not used any of them!). A popular example might be in order here! (some crow for me to eat!!).

However, I did and do have a popup calendar that I wrote “many” moons ago (access 2003), and this was to move off the ActiveX control.

You can enable any text box with a double click, or a button beside (single click) with ONE line of code.

And you can set the “ok” button to “auto ok” if you don’t want the users to have to click a date, and THEN click ok (but it is configurable by you). So users can double click the box, and one click on a date will select + close, or you can hit cancel.

Or you can have the “ok” button show, so users hit a date, and then have to click on ok.

You can also use the arrow keys, and hit enter (or Esc) to bail out.

It looks like this:

The code was designed with ease to “introduce” into existing applications.

I not looked at, or used the code in years, and it also has a start/end date prompt form, but the main use is a activeX popup replacement.

To use, simply import the 1 code module (modDate), and the two forms (alcal, and frmGetStartDate)

And from a button, or double click on the text box even, you call the popup form like this:

   Call PopDate("Enter Invoice date", Me.InvoiceDate, False)


Albert D. Kallal (Access MVP 2003-2017)
Edmonton, Alberta Canada ( 53.25K ): 12

Posted by: ADezii Oct 18 2019, 06:29 PM

I also developed a similar type Date Picker that was originally designed to be a Calendar. Assuming I can dig it up, I'll upload it for you to see.

Posted by: Gerrit Oct 18 2019, 07:04 PM


I think you miss understood what I meant by the two click method. I did not mean double click as in highlighting a word, I meant one click in the entry box to bring up the date picker icon and a second click on the date packer icon to open the date picker. My users prefer a single click in the date entry box to bring up a date picker. Now if the "industry standard" is to use a permanently viewable date picker icon alongside to date entry box, so be it. Though I cant find the code in Access.

For over 20 years my users have preferred the single click in the data entry field, and yes they could easily be persuaded to have a date picker icon alongside the data entry field to one click on. It is no biggy.

Hey, if you like ribbons and have superior knowledge to operate them, great. I don't mean to start a flame war on which is best, just offering what I do and what my users like. There is no right and wrong way, just different methods to suit each user.

As I said earlier, my users prefer to select the months from a nested set of buttons in the date picker, not a drop down box. Yep easily done on your date picker as well.

Bleeding heck, just explaining my users preferences and the reasons they prefer the layout off the forms as I do them, not to get into a debate about what is better or worse.

As for modern accounting forms and layouts! Just spent near three months evaluating ERP packages for various customers. Now they (the ERP software developers) could do with a course on how to set up easy to follow and user friendly usage forms. Do any of them ever sit down with the customers and ask them what they want? Even a simple industry standard of being able to have a workflow of raw materials, many sub assemblies to final assembly seems to be beyond their knowledge of what the customer wants.

To many software developers don't have a working knowledge of what the customer wants. That includes the likes of Microsoft especially with their OS and office developments. Killing the golden goose.

As soon as companies like Autodesk, Dassault, Planit, Adobe (and no doubt many more industrial software vendors) get operational ability on Linux the happier campers we will be.

Anyway rant over I have software to develop though the sun is out so will go and catch some fish instead. Summer is nearly here.

Posted by: isladogs Oct 18 2019, 07:19 PM

I'm a bit late to the party and have only skim read this thread.
In case its any use to you, see my

Posted by: AlbertKallal Oct 18 2019, 07:34 PM

No problem!

Not pointing out one way or the other way is the “only” way to go.

Software is not just vanilla ice cream, and what is so great about software is you can “usually” build things to what you feel works best. So you have as many choices as there are flavors of ice cream.

I think that’s the best advice! What you like and works should be (and is) your choice.

However, all I was pointing out that a single (or double) click on a date field is not an industry standard. Just wanted to set the record on this issue. So make a case for what you prefer, but one can't make a claim that this is how all other software tends to work.

However, my sample up-load will certainly work just fine with using the single click event on a text box. As noted, you can then click on a date (and have the popup auto close). Or you can have user select the date, and then hit ok button (so the click on date (and auto close) is configurable.

Best of luck on your project!

Albert D. Kallal (Access MVP 2003-2017)
Edmonton, Alberta Canada

Posted by: theDBguy Oct 18 2019, 09:45 PM

QUOTE (Gerrit)
The DBGuy;

Perfect, worked 100% You are a legend, thank you.

Only 42 lines of code to highlight and paste in your code.

Hi. Glad to hear you got it to work. Good luck with your project.