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.
13 3209
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,
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!
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,
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,
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.
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
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!!
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
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!!
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. -
Dim accObj As AccessObject
-
Dim strFrmName As String
-
Dim fForm As Access.Form
-
Dim ctl As Access.Control
-
-
' cycle through all the forms in your project
-
For Each accObj In CurrentProject.AllForms
-
-
' get the name of a form in your project
-
strFrmName = accObj.Name
-
-
-
-
If strFrmName <> "frmMain" Then 'ignore the form where this code is in - you cannot change the form you are in
-
' open your first form of your project
-
DoCmd.OpenForm strFrmName, acDesign, WindowMode:=acHidden
-
Set fForm = Forms(accObj.Name)
-
-
'cycle through all the controls on each form and change only the parameters you want
-
For Each ctl In fForm.Controls
-
' this will skip over any control that is not a text control since it won't have a ShowDatePicker property
-
On Error Resume Next
-
' change the ShowDatePicker Property
-
ctl.ShowDatePicker = False
-
Next
-
-
'close the form and you will be prompted for changes
-
'DoCmd.Close acForm, strFrmName
-
' or close the form and save without prompting
-
DoCmd.Close acForm, strFrmName, acSaveYes
-
Else
-
'do nothing
-
End If
-
-
Next
-
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
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 !!
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
I'm glad it wasn't a waste of time. I feel better now. :)
Have a great weekend!!
Sign in to post your reply or Sign up for a free account.
Similar topics
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
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...
|
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...
|
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...
|
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,...
|
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,...
|
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...
|
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...
| |