Combo Box (DTPicker) SHIFTS to the top of the form when repeatedly enabled and disabled

A

ashan

Hi everyone,

I have a problem with my Access 97 form. I have two DTPicker objects
set up and a option button (radio button) that enable and disable these
DTPicker objects. When I enable and disable once using the radio
button, the two DTPicker objects work perfectly but when I try to do it
again, the two objects shifts to the top of the form (and they are
enabled, if I click on the radio button again, they become disabled and
shift back to the original place).

This is the code for the radio button -

Private Sub optnDate_AfterUpdate()

If Me.optnDate = True Then

Me.calTo.Value = Now
Me.calTo.Enabled = False
Me.calFrom.Value = Now - 25000
Me.calFrom.Enabled = False


ElseIf Me.optnDate = False Then

Me.calTo.Value = Now
Me.calFrom.Value = Now
Me.calTo.Enabled = True
Me.calFrom.Enabled = True

End If


End Sub

---------------------------

Could someone please help???


Thanks
 

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