Access, dates, searching, and desperation

  • Thread starter Thread starter bender
  • Start date Start date
B

bender

website is IIS5, written in mostly FP2003 and ASP, Access 2000 d/b

client now decides he wants to search on dates and date ranges.

i had the various date-type fields as text fields, but with a
formatting of short year.

now, after changing these fields to date fields, i can insert dates
into new records ok, but only if i insert into all possible date
fields, since access doesn't like empty date fields.

1. is there some ASP code that will skip inserting or upgrading these
fields if they are empty?

or

2. if i left these fields as text fields, and created a query that
created new fields based on the original text fields, but as dates and
not text, could i then use the query fields to do the searching? would
this solve all my problems? (ok, some of my problems i'll never solve
:)

Larry
- - - - - - - - - - - - - - - - - -
"Forget it, Jake. It's Chinatown."
 
website is IIS5, written in mostly FP2003 and ASP, Access 2000 d/b

client now decides he wants to search on dates and date ranges.

i had the various date-type fields as text fields, but with a
formatting of short year.

now, after changing these fields to date fields, i can insert dates
into new records ok, but only if i insert into all possible date
fields, since access doesn't like empty date fields.

1. is there some ASP code that will skip inserting or upgrading these
fields if they are empty?

or

2. if i left these fields as text fields, and created a query that
created new fields based on the original text fields, but as dates and
not text, could i then use the query fields to do the searching? would
this solve all my problems? (ok, some of my problems i'll never solve
:)

Larry
- - - - - - - - - - - - - - - - - -
"Forget it, Jake. It's Chinatown."
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
whoops! fuggetaboutit :)

finally got my googling to turn up Kevin Spencer's great answer from
summer of 2002 re:

1. Require a date value in the form field, which ensures that there
will be
a value in the query.
2. Use server-side logic to build your query to insert a Null value
into the
field when the form field is empty:

Thanks!
the code you provided was very elegant and effective.

Larry
- - - - - - - - - - - - - - - - - -
"Forget it, Jake. It's Chinatown."
 
Back
Top