Insert Date From Calendar In Control

  • Thread starter Thread starter Lirva Smith via AccessMonster.com
  • Start date Start date
L

Lirva Smith via AccessMonster.com

I have a textbox control called: LastPayment and I have a calendar called
Calendar (this is not an activeX calendar), I also have a command button
called cmdLastPayment. When I click on cmdLastPayment it opens the
calendar to select a date, what I would like is the date to be placed in
the field "LastPayment". I tried using this code but get a message
"Message or Data Member not found".

What am I doing wrong? Thanks!

Private Sub cmdLastPayment_Click()
Me.LastPayment = Me.Calendar.Value
End Sub
 
Where is this calendar located? Your syntax makes it appear that the
calendar is a control on the form that is running the code. Also, you say
that clicking the button opens the calendar, but it appears that all you're
doing is assigning the value from the calendar to the control, how are you
opening the calendar?

You may also want to check out Stephen Lebans's way of doing this.

http://www.lebans.com/monthcalendar.htm
 

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

Back
Top