Calendar Control

A

Alex Martinez

I am using Access 2002 and I have a problem using MS Calendar Control,
unfortunately I have been asked to used this type of control only,
although I much pefer using Allen Browne calendar control. My problem seem
when I add a new record using a simple command button (see below) I cannot
get the same date in my calendar control (see below for code). I need to
select a different date and then I can go back to the date I orginially
wanted. For example when I add a new record I selected July 8th in the
calender control and it will poplulate a field called "completed" and when
I add a new record again I can't choose July 8th again I would have to
select any other date but July 8th after I selected another date let's say
July 7th then that's when I can select July 8th. I don't understand why?
Any tips or help will be appreciated. Thank you in advance.

Add command

On Error GoTo Err_cmdAdd_Click

DoCmd.GoToRecord , , acNewRec
cboInvoiceType.SetFocus
Exit_cmdAdd_Click:
Exit Sub

Err_cmdAdd_Click:
MsgBox Err.Description
Resume Exit_cmdAdd_Click



Calendar Control - On Click
Private Sub CalendarCompleted_Click()

textCompleted.SetFocus
textCompleted.Value = CalendarCompleted.Value
CalendarCompleted.Visible = False

End Sub
 
P

PC Datasheet

Add the following code after this line:
textCompleted.Value = CalendarCompleted.Value

CalendarCompleted.Value = Null
 
A

Alex Martinez

I tired this coding below and I am still unable to select the same date when
I add another record. Thank you in advance.
 

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