473,394 Members | 1,671 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Date Picker in 2007 Problem in 2002

18
I have developed a db in Access 2002. I have a command button that will bring up a calendar form which the user selects a date & it'll put it in a txt box. I have a lot of code behind this calendar form. The problem is, those users that have Access 2007 an icon is placed in front of my command button & they will click it & use the 2007 calendar instead of mine, thereby not activating my code. Is there any way to prevent this feature from appearing? My db is an MDE file, if that makes any difference.

Thanks for any suggestions.
Feb 19 '09 #1
13 3209
mshmyob
904 Expert 512MB
There is a property under the format tab called "Show Date Picker" - set it to NEVER and it will not show for date formated text controls.

Since you have just the MDE I don't believe you will be able to do it. You will need the original source code.

cheers,
Feb 20 '09 #2
cpStar
18
Thanks for your suggestion. However isn't that property you're referring to in the 2007 version? You can't change that for the Access program can you? Isn't it db related? I did try that several weeks ago, but if I remember correctly I think I had to create a blank db before I could change that option, so when I tried my 2002 MDE db it had no effect on it. The only db that would effect is the one you create in 2007, correct? btw, I'm the developer so I have the source code .... before delivering to my client I create an MDE file.

I've done a lot of searching on this, but have come up with nothing. So any help you can give me, I certainly appreciate!
Feb 20 '09 #3
mshmyob
904 Expert 512MB
I will create a 2002 database with the features you mention and then play with it in 2007 and see what I can come up with. I am wondering if through code if you iterate through all forms and change the property I mentioned if it will work.

I will try some things and get back to you.

cheers,
Feb 20 '09 #4
mshmyob
904 Expert 512MB
Actually can you open your source in AC2007 and make the changes to the form controls like I said erlier and then save it in AC2002 format (from Ac2007) and see if that works.

cheers,
Feb 20 '09 #5
cpStar
18
Unfortunately, I don't have 2007, however I could try that at my client. I'm not that familar with 2007 .. does it allow you to convert it to 2002 & then save it as an MDE? From my prev experience with different versions, if you want to create an MDE you have to convert it to that current version, not lower.

Thanks again for all your time & help with this, mshmyob.
Feb 20 '09 #6
mshmyob
904 Expert 512MB
Yes, with AC2007 you can save as AC2002 and create a AC2002 MDE file.

The biggest problem I have found with saving to an earlier version is if you create an app in AC2007 and use macros they don't get saved in the lower versions. You will not be doing this however.

cheers,

@cpStar
Feb 20 '09 #7
cpStar
18
That's good to hear! I'll give it a try & let you know how I make out. The only problem I see with this is when I need to make changes at my office & save on my Access 2002 pc I'll lose that setting so will have to go back into Access 2007 & add that each & every time there's a change. But if this is the only way to resolve the problem, guess I don't have a choice. Too bad MS didn't think of this & have this feature turned off by default, or at least a way to turn this feature off from the actual program not individual db.

Thanks again, mshmyob, for your quick response!!
Feb 20 '09 #8
mshmyob
904 Expert 512MB
Yes it is a known issue and unfortunatley there is no global setting in AC2007 for this. It is done at the control level.

Over the weekend I will try and throw some code together to iterate through your forms and turn it off via vba. If I get it working I will upload it so you can try it and let me know if it works since I can't test it (I only have 2007 installed now).

cheers,

@cpStar
Feb 20 '09 #9
cpStar
18
I believe it's working!!! I was able to find the property I needed to use in code. On my PC with 2002, I put this code in the txtbox's OnEnter event:
Me!txtTestDate.ShowDatePicker = False.

I wasn't sure if it would compile w/o errors, but it worked fine. I then converted it to 2002 & then made an mde file with no errors. I put it on their server & it works fine. So it appears I won't have to do this each & every time there's a change.

If there is a better way to do this, let me know, otherwise I think it's all set. THANK YOU SO MUCH!! This has been such a pain in my neck as it's been causing data entry problems. Users would use the 2007 calendar even though I've brought it to their attention several times to be sure they're using my calendar & not 2007's.

Thanks again mshmyob!!
Feb 20 '09 #10
mshmyob
904 Expert 512MB
Here is some code I just thru together that will iterate through all your forms and make the changes automatically for you.

Put the code in say the main menu or any form that has no meaning (you can create a new one). You can put it in the on open event or behinnd a button click - whatever.

Expand|Select|Wrap|Line Numbers
  1. Dim accObj As AccessObject
  2. Dim strFrmName As String
  3. Dim fForm As Access.Form
  4. Dim ctl As Access.Control
  5.  
  6. ' cycle through all the forms in your project
  7. For Each accObj In CurrentProject.AllForms
  8.  
  9. ' get the name of a form in your project
  10. strFrmName = accObj.Name
  11.  
  12.  
  13.  
  14. If strFrmName <> "frmMain" Then 'ignore the form where this code is in - you cannot change the form you are in
  15. ' open your first form of your project
  16. DoCmd.OpenForm strFrmName, acDesign, WindowMode:=acHidden
  17. Set fForm = Forms(accObj.Name)
  18.  
  19. 'cycle through all the controls on each form and change only the parameters you want
  20. For Each ctl In fForm.Controls
  21.     ' this will skip over any control that is not a text control since it won't have a ShowDatePicker property
  22.     On Error Resume Next
  23.     ' change the ShowDatePicker Property
  24.     ctl.ShowDatePicker = False
  25. Next
  26.  
  27. 'close the form and you will be prompted for changes
  28. 'DoCmd.Close acForm, strFrmName
  29. ' or close the form and save without prompting
  30. DoCmd.Close acForm, strFrmName, acSaveYes
  31. Else
  32. 'do nothing
  33. End If
  34.  
  35. Next
  36.  
Notice I called this from a form called frmMain and I ignore that form (line 14) - it may work without it but I haven't done much testing. It will cycle through all your forms and change all TEXT controls to SHOWDATEPICKER=False

cheers,

@cpStar
Feb 20 '09 #11
cpStar
18
Thanks for your code, but I was hoping my last message got to you before you spent any more time on it. I should have also explained I don't have that many date txtboxes so I had already added that 1 line of code to all of them. However, I am keeping your code as I know I'll use it for other things.

Thanks so much, mshmyob, for all your help & patience with this. It was greatly appreciated !!
Feb 20 '09 #12
mshmyob
904 Expert 512MB
You're welcome. The code was not a waste of my time since I can use it in a modified manner for something I am working on but was not ready to look into yet.

cheers,


@cpStar
Feb 21 '09 #13
cpStar
18
I'm glad it wasn't a waste of time. I feel better now. :)

Have a great weekend!!
Feb 21 '09 #14

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: Hussein Patwa | last post by:
Hi there. I'm new to this group. I'm also partially sighted so navigating the web is sometimes quite difficult. I'm looking for a javascript date picker, you know the ones that travel sites...
1
by: Jim Heavey | last post by:
Hello, I am trying to alter the default date format shown in the date picker control. I am using the "Custom Format" property and setting this value to "ddd M/d/yy", but this has no effect. What...
4
by: Rethish | last post by:
Hi All, I am developing an application in VB.net. I am using .Net Datetime picker control to manage the date. But I am not able to assign null/Empty value to the control. I found the property...
0
by: keithsimpson3973 | last post by:
Does anyone know if it is possible to display the value of a date picker control on a vb6 form that the user selected on an access report? I am using vb6 to display a report selection and it has a...
3
by: ramu | last post by:
Hi all, I created a date picker using java script in my asp.net 2005 application which is for the IE. But im trying to run my java script for date picker in mozilla but i cant. so could any...
1
by: vp.softverm | last post by:
hi all . Am facing problem with the date picker. when i click on date picker in a popup window. the date table is opened in the middle of the pop up window. and it is unable to scroll with...
1
by: Bobby | last post by:
Hi, I'm using Office 2007. I have a text field called txtDate which is formatted to medium date. This gives me the date picker when the control has the focus. I have several other text controls...
0
by: burledivya | last post by:
Hi Friends, Iam new to this forums. by the suggestion of my friend i came to know that this forum is very very good and we get a very good responses. iam new to .NET 3.5 , WPF, infragistics and...
2
tharini
by: tharini | last post by:
Am using a date picker control to select dates in my PHP page... whenever i run the page in firefox the position of the picker control remains same near the textbox but when i run the same page in...
1
tharini
by: tharini | last post by:
Am using a date picker control to select dates in my PHP page... whenever i run the page in firefox the position of the picker control remains same near the textbox but when i run the same page in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.