Problem returning Date from Control?
A2k (9.0.3821) SR-1
I have a form with date control that has an Double Click with =PopupCalendar([Screen].[ActiveControl]) and it works OK.
I
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Problem returning Date from Control? (A2k (9.0.3821) SR-1)
The returned value is ignored for a function you put in an Event property. Therefore, everything you want done you must do in the called function. I’d do it this way:
=PopupCalendar([txtDate2])
I assume your function is probably defined something like this:
Public Function PopupCalendar(ctl as control)
So, all you need to do is add a line in this function: ctl = selectedDate
Hi Mark
The reason I wanted to put it in the [Event Procedure] was so I could conditionally fire an after upde event
Private Sub txtDate2_DblClick(Cancel As Integer)
Me.txtDate2 = PopupCalendar(Screen.ActiveControl)
txtDate2_AfterUpdate ‘ Opt/Mod
End Sub
How would I have to change popup mod to accommodate this
John
John I use the calender as posted earlier, to control a subform, showing currently booked out cars.
Its an activeX one though, but quite easy to manipulate.
See code and pic attached.
You may have to register it first. MSCAL.Calendar.7
I ‘ve previously been quite succesful with the date & tima picker.
As said earlier, their are loads of different variations on the web.
Just a thought, I think this thread is solved, but there a ton of form based popup calendars out there. (I have one on my site.). This doesn’t seem like a very tricky issue, but having a form based calendar has several advantages. The biggest is that you are not using an ActiveX control that must be setup on the client machines. The second, you have code that you can modify, to custom fit the application.
Drew
Sorry about that. In 97, when Access ‘disappears’ you should have a form on your desktop. In 2000, it’s a version issue. Access 2000 handles windows a bit differently. In either case, Access is still running. I have a module that hides/shows the Access window, and I put it in the MiniCalendar to show how to use it. There is a AutoKeys macro, where if you hit Ctrl-A, Access will show (and repeating that will hide it again.).
One tip, a lot of sample databases have initial startup code. The MiniCalendar hides Access, however some are live dbs, that someone posts a portion for sample usage. A lot of times in those cases, there is startup code that fails, since either part has been disabled, or it is looking for a network resource that doesn’t exist. You can bypass any access databases startup routines by holding the shift key down. You can disable the ShiftBypassKey through code, for your own applications (to prevent users from bypassing your startup stuff), but I have yet to see a sample database that had the ShiftBypassKey disabled.
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.