Larry Rekow wrote:You'e welcome.> Creating an application website with MS Access on a Windows 2000
> 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
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?
> 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
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.
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