Help with Pop-up Calendar on form

N

Nathan Lars

I am following the Access tips from the following wedsite link and trying to
figure this out without bothering anyone but I am stumped.

http://www.fontstuff.com/access/acctut09.htm

I have entered the below text into the Date field combo box's Mouse Down
event procedure and substitued the cboStartDate and ocxCalendar names with
the names i have called them in an existing database, but I can't get it to
work.

Private Sub Date_MouseDown(Button As Integer, Shift As Integer, X As Single,
Y As Single)
ocxCalendar.Visible = True
ocxCalendar.SetFocus
If Not IsNull(cboStartDate) Then
ocxCalendar.Value = cboStartDate.Value
Else
ocxCalendar.Value = Date
End If

What am I doing wrong?
 
N

Nathan Lars

You're right, that was easy. I think looks cleaner than the other Calendar.

Is there a way to control where the calendar pops-up after the button is
selected? Right now it seems to open in the center of the form, but I would
like it to open immediately to the right of the button for greater
effeciency.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top