Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / May 2008

Tip: Looking for answers? Try searching our database.

Hide Pop-up Calendar by clicking Outside It

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mercadogs - 14 May 2008 15:59 GMT
Hello World:

I pray you are doing great today!

My Question:
Is there a way to hide a pop-up calendar whenever the user clicks anywhere
outside of the calendar? Right now, I am using the code below, which whenever
the user clicks on this particular combo box, the calendar is shown. However,
the calendar doesn't disappear unless a date is selected from the calendar.

Beginning of Code:

Private Sub txt_DateCreated_MouseDown(Button As Integer, Shift As Integer, X
As Single, Y As Single)

Set cboOriginator = txt_DateCreated
 

If Not IsNull(cboOriginator) And cboOrinator <> "" Then
       If MsgBox("Are you sure you want to update this date?",
vbYesNoCancel, "Click yes to update " & _
                   "date...") = vbYes Then
           RequestDateCal.Visible = True
           RequestDateCal.SetFocus
           RequestDateCal.Value = cboOriginator.Value
           
       Else
           'txt_Date.SetFocus
       End If
       
   Else
       RequestDateCal.Visible = True
       RequestDateCal.SetFocus
       RequestDateCal.Value = Date
   End If

End Sub

'''End of Code
Maurice - 15 May 2008 08:22 GMT
I assume the calendar you are using is placed on a form. This form is
probably set to modal and therefore won't hide unless you select a date. This
is the way it is supposed to work. Why would you run the risk of forgetting
to close the calendarform? This could cause problems in other situations. A
solution might be to set the form to not modal that way it can be hidden
behind another form but be aware that this might cause problems in the rest
of your db. I'd advice you to use the current settings...

If I want to give the user an option I place the calendar behind the double
click of the textbox, that way if they want to enter there own option they
can by just tabbing to the control or just click once..

hth
Signature

Maurice Ausum

> Hello World:
>
[quoted text clipped - 35 lines]
>
> '''End of Code
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.