If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Combo Box (DTPicker) SHIFTS to the top of the form when repeatedly enabled and disabled
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 |
#2
|
|||
|
|||
Combo Box (DTPicker) SHIFTS to the top of the form when repeatedly enabled and disabled
Anyone?...please...really need help for this project!
On Nov 8, 1:08 pm, "ashan" wrote: 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 |
Thread Tools | |
Display Modes | |
|
|