A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

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



 
 
Thread Tools Display Modes
  #1  
Old November 8th, 2006, 06:08 PM posted to microsoft.public.access.forms
ashan
external usenet poster
 
Posts: 2
Default 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  
Old November 9th, 2006, 01:00 PM posted to microsoft.public.access.forms
ashan
external usenet poster
 
Posts: 2
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:13 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.