473,396 Members | 1,849 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,396 software developers and data experts.

Access webDB form- Prevent user from directly typing into datepicker box

George Tekos
hello! I have an Access 2010 webDB form that contains a date picker. (Users choose the date, fillup two more fields and submit the form)
I would like the user to choose the date from the calendar popup small window, not typing directly in the box. Can you help me?

if you want i can upload the db

Thank you
Dec 21 '11 #1

✓ answered by NeoPa

That falls under the single control category then. All that is available to you is what is made available by the designer of the control. In this case that's MS, but that's not important.

13 5393
NeoPa
32,556 Expert Mod 16PB
I don't know what a webDB form is, but if the control you want to protect from user typing is set to Locked, then there will be no user typing into that control. Your code for populating it from the Calendar control could be written to set Locked to false prior to the update and then set it back again when it's finished. Does that make sense?
Dec 21 '11 #2
if i set the control to "LOCKED", I cant type ofcourse, but neither choosing from the calendar. i wanted to know if there is a way of not typing, just choosing. access web dbs have less than the half regular features, enables... :(
Dec 21 '11 #3
NeoPa
32,556 Expert Mod 16PB
I don't know as I don't have any experience with web dbs at all, but would the Calendar control not have an AfterUpdate event triggered when it's been used. Surely the code in there could clear then set the Locked property? I'm flying in the dark, but I expect there is a way of handling it if you look at what's available and how they interact.
Dec 21 '11 #4
Mihail
759 512MB
No, NeoPa.
I think that George refer to a small calendar control near a text box control bound to a field with DATE type.
This small calendar do not exist in 2003. I know that exist in 2007 and, of course, must exist in 2010 because is very useful.

I have no idea, George how to prevent user to type into. But you can use BeforeUpdate event for that text box to check if what is entered is really a date. If not, cancel the Update event and prompt the user to use the calendar.

It is just an idea.
Dec 22 '11 #5
NeoPa
32,556 Expert Mod 16PB
I wasn't sure whether it was a single control or two. The way you explain it, it seems to be both, so I'm still not clear. If they are separate controls then it seems there must be code running to reflect one in the other. Otherwise the control is designed that way and control design is something we can do very little about of course (We select a control to use and have to live with what is there).
Dec 22 '11 #6
Mihail
759 512MB
Hi again, NeoPa.
I upload a small .jpg to show you the text box control with the Date Picker near it (a small square to the right).
This appear only when the control has focus. A click to the Date Picker open the small calendar (as you can see) from where the user can pick a date.

If the control is locked the Date Picker steel appear, the user steel can pick a date from calendar but with no results (no change in the text box / field).

Hope you understand that the Text Box + Date Picker is only one control.

Attached Images
File Type: jpg DatePicker.jpg (33.5 KB, 2026 views)
Dec 22 '11 #7
neelsfer
547 512MB
I would also like to prevent people from adding dates manually because when the datepicker is in use, the input mask function does not work.
Dec 22 '11 #8
NeoPa
32,556 Expert Mod 16PB
I went to a copy of 2010 to see if I could check what you say. I found no Date Picker control available. Maybe the actual name would help.

Typically, if the TextBox control is updated by the Date Picker control then it isn't a TextBox control at all, but just something that looks in some way similar. A TextBox is a control, and not a part of a control. You may start to understand why I find your statements somewhat hard to take at face value. I can't see how they can possibly both be true. With the proper name of the control though, I might be able to find the truth for myself.
Dec 22 '11 #9
Mihail
759 512MB
It is a text box, NeoPa.
I upload another .jpg to see the property sheet.
As you can see a property is Show Date Picker.
With two options: Never and For dates

Attached Images
File Type: jpg PropertySheet.jpg (33.5 KB, 2197 views)
Dec 22 '11 #10
if someone chooses to create/open an Access 2010 WEB database, there is no choise for date picker box..
the only way it to FIRST set a field in the table as DATE, and AFTER to create a form, ADD EXISTING FIELDS, and the date picker will appear to the form, at the position you placed it. Yes it acts as one control , (always talking about WEB databases, and only)and it seems these two imput methods(pick date & type date) work together or dont work at all....
but after my previously solved issue, in which Narender Sagar helped me so much, i still believe in a potential solution...
Dec 22 '11 #11
NeoPa
32,556 Expert Mod 16PB
Ah. That starts to make sense. It's an updated TextBox that provides DatePicker functionality as an option. It seems 2007 wasn't such a waste of time after all. There actually were some (an) useful improvements :-D
Dec 22 '11 #12
Please pay attention to the title >>>Access webDB form-
i am not working on a regular access db.
Access 2010 Web databases have less than the half features enabled or "easily found" [ ]
Dec 22 '11 #13
NeoPa
32,556 Expert Mod 16PB
That falls under the single control category then. All that is available to you is what is made available by the designer of the control. In this case that's MS, but that's not important.
Dec 22 '11 #14

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

Similar topics

6
by: Jay | last post by:
Hi everybody! Please help me with this problem. I try to write code for server side data validation. Initially, I have a html file called "form.html" which just contains all the necessary fields...
2
by: iam247 | last post by:
Hi I have an ASP form which only includes an option list. The list is dynamically created but includes a default value, which is an instruction "Select a group". The code is shown at bottom....
4
by: vips | last post by:
how can we identify whether the web page is opened by typing the link in the address bar or it opened by clicking it from one of the previous pages ?? Is there any way to find this out .....I...
1
by: xs | last post by:
Hi, Is it possible to access Master Pages from Ascx directly? In an Aspx, by entering the following , <%@ MasterType VirtualPath="~/Pages/Master.Master"%> , I can easily access its property...
1
by: Colin Hook | last post by:
I am interested in preventing Access Updating if the User Has inadvertently entered wrong information via a Form. Is it possible to flag up a message "Do You Really Want to Do This prior to the...
1
by: User | last post by:
Hi, Are there ways to let browser forget about the previous submitted form data? Or prevent user from pressing F5 to submit the same form again Or prevent user from presising back on the...
4
by: Luqman | last post by:
How can I Prevent user from accessing any page directly without Login ? User should not be able to by pass the Login screen by typing the Url of any page directly. I am using ASP.Net 2.0 with...
0
by: helveticus | last post by:
I have a master/details configuration that includes multiple user controls. The details page is configured to cache data via VaryByCustom. This works fine. One of the user controls contains an...
0
by: Appyks | last post by:
How Do I prevent User from Locking the System? Obviously I can set following Windows registry value But it doesn’t serve my propose "DisableLockWorkstation"=dword:00000001 I need...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.