Calendar form caption

josephbupe

Registered User.
Local time
Today, 17:02
Joined
Jan 31, 2008
Messages
247
Hi,

I was looking for an ordinary calender I could re-use in my Access project, then I found just the kind I want done by Allen at http://allenbrowne.com/ser-51.html#

I am using this calendar pop-up merely to check dates (not to populate any control). But my issue is that I want to change the form caption on the calendar form, I can't find where to change it. I looked in the form properties and in the form code. Still I cannot locate the text used being for as the form caption.

Any suggestions is appreciated.

Joseph
 
It is set dynamically when calling the form in strTitle.

If you walk through the code, you should see where that is set. Then change to suit. If you do not pass anything then it is not set.

Look in the Form Open event of the calendar

HTH

Code:
Public Function CalendarFor(txt As TextBox, Optional strTitle As String)
'On Error GoTo Err_Handler
    'Purpose:   Open the calendar form, identifying the text box to return the date to.
    'Arguments: txt = the text box to return the date to.
    '           strTitle = the caption for the calendar form (passed in OpenArgs).
    
    Set gtxtCalTarget = txt
    DoCmd.OpenForm "frmCalendar", windowmode:=acDialog, OpenArgs:=strTitle
    
Exit_Handler:
    Exit Function

Err_Handler:
    MsgBox "Error " & Err.Number & " - " & Err.Description, vbExclamation, "CalendarFor()"
    Resume Exit_Handler
End Function

In fact it is set in the click event entry of the button and is mentioned in point 3 where you got the code? http://allenbrowne.com/ser-51.html#
 
Last edited:
Yes, that worked.

Thanx alot.
 

Users who are viewing this thread

Back
Top Bottom