PC Review


Reply
Thread Tools Rate Thread

Access, dates, searching, and desperation

 
 
bender
Guest
Posts: n/a
 
      10th Feb 2004
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."
 
Reply With Quote
 
 
 
 
bender
Guest
Posts: n/a
 
      10th Feb 2004
On Mon, 09 Feb 2004 19:52:40 -0800, bender <larry@netgeexdotcom>
wrote:

>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."
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
searching between dates Joe@Willscot Microsoft Excel Worksheet Functions 3 10th Feb 2009 02:44 PM
Searching between dates Steve/Aus Windows Vista General Discussion 1 14th Oct 2008 03:05 AM
Searching between two dates =?Utf-8?B?cmp3MjQ=?= Microsoft Access 12 26th Jun 2007 02:59 PM
Searching within given dates. =?Utf-8?B?RGF2aWQuVy4=?= Microsoft Access VBA Modules 2 8th Jun 2006 11:05 AM
Searching dates =?Utf-8?B?bWFjX3NlZQ==?= Microsoft Excel Programming 9 8th Apr 2005 07:17 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:20 PM.