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  

hiding Calender Form button



 
 
Thread Tools Display Modes
  #1  
Old June 23rd, 2008, 09:13 PM posted to microsoft.public.access.forms
mikeinohio
external usenet poster
 
Posts: 58
Default hiding Calender Form button

Hello, i have a form that have a text box and a called:

txtbirthdate and and a command button called cmdbirthdate that when click
it a form called frmCalender pops up and you can select the date that will
be passed back to the text box, my question is how can i hide this command
button until the text box eith is selected and/or gets the focus and then one
the date is entered the command button disappears again.

also as an alternative how can i make it disappear until the text box is
double clicked.
  #2  
Old June 24th, 2008, 03:58 PM posted to microsoft.public.access.forms
Arvin Meyer [MVP]
external usenet poster
 
Posts: 4,231
Default hiding Calender Form button

I'm guessing that you are using the Access 2007 accdb format for your
database. If you don't need these features, you can use the MDB format, and
the popup calendar form on my website. It has worked in every version since
Access 2.0:

http://www.datastrat.com/Download/Calendar2K.zip
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

"mikeinohio" wrote in message
...
Hello, i have a form that have a text box and a called:

txtbirthdate and and a command button called cmdbirthdate that when click
it a form called frmCalender pops up and you can select the date that
will
be passed back to the text box, my question is how can i hide this command
button until the text box eith is selected and/or gets the focus and then
one
the date is entered the command button disappears again.

also as an alternative how can i make it disappear until the text box is
double clicked.



  #3  
Old June 26th, 2008, 06:29 PM posted to microsoft.public.access.forms
mikeinohio
external usenet poster
 
Posts: 58
Default hiding Calender Form button

Actually i am using Access 2003i already have a text box named txtMedStart
Date anda command button called cmdMedstartDate, all i want is the cmd button
to disappear once the txt box is undated and for it to show once the text box
is clicked, Thanks Arvin, any suggestions?

"Arvin Meyer [MVP]" wrote:

I'm guessing that you are using the Access 2007 accdb format for your
database. If you don't need these features, you can use the MDB format, and
the popup calendar form on my website. It has worked in every version since
Access 2.0:

http://www.datastrat.com/Download/Calendar2K.zip
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

"mikeinohio" wrote in message
...
Hello, i have a form that have a text box and a called:

txtbirthdate and and a command button called cmdbirthdate that when click
it a form called frmCalender pops up and you can select the date that
will
be passed back to the text box, my question is how can i hide this command
button until the text box eith is selected and/or gets the focus and then
one
the date is entered the command button disappears again.

also as an alternative how can i make it disappear until the text box is
double clicked.




  #4  
Old June 26th, 2008, 10:16 PM posted to microsoft.public.access.forms
Linq Adams via AccessMonster.com
external usenet poster
 
Posts: 1,474
Default hiding Calender Form button

Actually, the simplest thing to do would be to do away with the command
button to bring up the calendar. Instead, replace the command button by using
the DoubleClick event of the textbox to make the calendar visible.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200806/1

  #5  
Old June 27th, 2008, 05:37 AM
PJHAction PJHAction is offline
Member
 
First recorded activity by OfficeFrustration: Jun 2008
Posts: 3
Default

The best calendar control I found is on

http://www.allenbrowne.com/ser-51.html

Very Simple

Peter
  #6  
Old June 27th, 2008, 03:15 PM posted to microsoft.public.access.forms
mikeinohio
external usenet poster
 
Posts: 58
Default hiding Calender Form button


Can you briefly explain how that is done, would be apreciated, i been asking
this question for a month
"Linq Adams via AccessMonster.com" wrote:

Actually, the simplest thing to do would be to do away with the command
button to bring up the calendar. Instead, replace the command button by using
the DoubleClick event of the textbox to make the calendar visible.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200806/1


  #7  
Old June 27th, 2008, 06:14 PM posted to microsoft.public.access.forms
Linq Adams via AccessMonster.com
external usenet poster
 
Posts: 1,474
Default hiding Calender Form button

Sure! What I do for this type of thing is place a calendar control on the
form, positioned as you like and set it's Visible Property to NO.

Then, using the DoubleClick property of your text box, have the calendar
"popup" for date selection. You'll need to replace YourCalendarName and
YourTextBoxName with the actual names of your calendar and text box.

Private Sub YourTextBoxName_DblClick(Cancel As Integer)
YourCalendarName.Visible = True
End Sub

Private Sub YourCalendarName_Click()
YourTextBoxName.Value = YourCalendarName.Value
YourTextBoxName.SetFocus 'Take focus off of the calendar
YourCalendarName.Visible = False 'MAkes alendar vanish
End Sub

Now, all your user has to do is DoubleClick on the text box and up pops the
calendar! When the user clicks on the date, the calendar disappears and the
text box is populated with the date.

Linq

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via http://www.accessmonster.com

 




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 11:14 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.