Ask a Question related to ASP Database, Design and Development.
-
Larry Rekow #1
options for form entry validation
Creating an application website with MS Access on a Windows 2000
Server.
I have a page where the user can enter in a "startdate" and "enddate";
these become parameters in a saved parameter query, and it works quite
well (thanks especially to Bob B for his help with this issue).
Since the date originates from a linked text flat file, and since the
date is in text format using leading zeroes (01/01/04, for example),
it only works when the user enters the date in this format.
on the data entry page, i can of course mention to use the proper
format, but i'm wondering if I also can/should:
1. just munge the data in the receiving page with some logic to "fix"
the data if it is in the wrong format (using some sort of "replace"
asp code logic)? , and/or:
2. put in some clientside or server-side validation?
3. create an expression in the access query that changes the text date
to a numerical date that can accept any kind of date entry?
if 2 above is the best answer to this, is there an easy way (I'm using
ASP and not ASP.net) to have a custom error message to tell the user
exactly what is wrong? like an alert that sez "Pls enter dates in
following format...blah, blah"
Thanks in advance for any ideas.
Larry
- - - - - - - - - - - - - - - - - -
"Forget it, Jake. It's Chinatown."
Larry Rekow Guest
-
data entry form for many-to-many
I think this is more of a forms question than design question, so bear with me . . . . I am designing a database primarily needed to manage our... -
CFFORM Validation trumping Custom Form Validation
Is there any way for custom form validation to work in concert with the cfform validation? I have a custom script that compares the values of two... -
Data entry form
Can someone point me in the right direction, I need to code many forms that would allow a user to enter one row of data into a SQL database. ... -
Obligatory entry on form
"Lapchien" <cc8345@NOSPAMeclipse.co.uk> wrote in message news:1059928544.242177@ananke.eclipse.net.uk... Any reason you don't just set the fields... -
Entry into Form via barcode scan
All applications support bar code reading as long as you have the right equipment. Most bar code readers are available with one of two output... -
Bob Barrows [MVP] #2
Re: options for form entry validation
Larry Rekow wrote:
You'e welcome.> Creating an application website with MS Access on a Windows 2000
> Server.
>
> I have a page where the user can enter in a "startdate" and "enddate";
> these become parameters in a saved parameter query, and it works quite
> well (thanks especially to Bob B for his help with this issue).
Could you clarify this statement? Are you directly querying the linked text>
> Since the date originates from a linked text flat file, and since the
> date is in text format using leading zeroes (01/01/04, for example),
> it only works when the user enters the date in this format.
file? or are you moving the data from the linked file into a native Jet
table? If the latter, why aren't you storing the dates in a date/Time field
so you don't have this date format issue? It seems to me that you would be
better off using dates in an unambiguous format (ISO: yyyy/mm/dd) in your
queries.
I would hesitate to do this if it is important that the user's intended date>
> on the data entry page, i can of course mention to use the proper
> format, but i'm wondering if I also can/should:
>
> 1. just munge the data in the receiving page with some logic to "fix"
> the data if it is in the wrong format (using some sort of "replace"
> asp code logic)? , and/or:
not be mistaken.
Both should probably be done.> 2. put in some clientside or server-side validation?
I very often use a javascript calendar to simplify date entry. Google should> 3. create an expression in the access query that changes the text date
> to a numerical date that can accept any kind of date entry?
>
> if 2 above is the best answer to this, is there an easy way (I'm using
> ASP and not ASP.net) to have a custom error message to tell the user
> exactly what is wrong? like an alert that sez "Pls enter dates in
> following format...blah, blah"
>
turn up dozens of them for you. I think Aaron mentions some at his aspfaq
site.
Alternatively, it's less user-friendly, but using three dropdowns for year
month and day practically guarantees mistake-free dates, especially if you
make them dependent to prevent the entry of 2004-02-30 for example.Even with
this, I would include server-side validation.
Bob Barrows
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Bob Barrows [MVP] Guest
-
Larry Rekow #3
Re: options for form entry validation
On Sun, 8 Aug 2004 08:30:24 -0400, "Bob Barrows [MVP]"
<reb01501@NOyahoo.SPAMcom> wrote:
++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++>>>
>> Since the date originates from a linked text flat file, and since the
>> date is in text format using leading zeroes (01/01/04, for example),
>> it only works when the user enters the date in this format.
>Could you clarify this statement? Are you directly querying the linked text
>file? or are you moving the data from the linked file into a native Jet
>table? If the latter, why aren't you storing the dates in a date/Time field
>so you don't have this date format issue? It seems to me that you would be
>better off using dates in an unambiguous format (ISO: yyyy/mm/dd) in your
>queries.
A unix box runs a report which creates the text file once daily, and
then it's automatically ftp'd to the windows box where it overwrites
the previous text file. Since the file is a linked table, and not an
imported table, the data is updated automatically in Access.
I created a query in Access with the startdate and enddate parameters,
but it would only work if the dates were input exactly like the
original date field ENTRY-DATE; so I've added an expression:
NUDATE: Format([ENTRY-DATE],"m/d/yy")
then i put the criteria of [startdate] and [enddate] in that field
instead of the ENTRY-DATE field, and now it works when users enter
dates like: 1/1/04
However, you've brought up other considerations, and I may indeed
switch to the calender or drop-down ploy. I'm doing this application
for use by customers of one of my clients, and need it to be as
friendly and bullet-proof as possible, AND, I believe, they are in
France which will certainly require an unambiguous date entry.
Thanks again,
Larry
- - - - - - - - - - - - - - - - - -
"Forget it, Jake. It's Chinatown."
Larry Rekow Guest
-
Bob Barrows [MVP] #4
Re: options for form entry validation
Larry Rekow wrote:
So you aren't moving the data from the linked text file into a native Access> On Sun, 8 Aug 2004 08:30:24 -0400, "Bob Barrows [MVP]"
> <reb01501@NOyahoo.SPAMcom> wrote:
>> ++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++>>>>>
>>> Since the date originates from a linked text flat file, and since
>>> the date is in text format using leading zeroes (01/01/04, for
>>> example),
>>> it only works when the user enters the date in this format.
>> Could you clarify this statement? Are you directly querying the
>> linked text file? or are you moving the data from the linked file
>> into a native Jet table? If the latter, why aren't you storing the
>> dates in a date/Time field so you don't have this date format issue?
>> It seems to me that you would be better off using dates in an
>> unambiguous format (ISO: yyyy/mm/dd) in your queries.
> A unix box runs a report which creates the text file once daily, and
> then it's automatically ftp'd to the windows box where it overwrites
> the previous text file. Since the file is a linked table, and not an
> imported table, the data is updated automatically in Access.
table. OK.
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Bob Barrows [MVP] Guest



Reply With Quote

