Graham - I've made Friends w/EMPTY() - since I like that it can work for all
cases - whether Char, Num or Date. 

Also - Frank "Hit the Nail on the Head" with his suggestion - that solved my
problems - Just did an Init to the Text fields per his suggestion. Now the
EMPTY() function works just fine!

-K-

-----Original Message-----
From: ProfoxTech [mailto:[email protected]] On Behalf Of Graham
Brown
Sent: Tuesday, March 05, 2013 11:08 AM
To: [email protected]
Subject: RE: A Form & a Strange Date Problem

I've never trusted empty!
 
I always use len(trim(var))=0 or dDate<ctod("01/01/1900") . Have to watch
those nulls as well if it is sql server.
 

________________________________

From: ProFox on behalf of Kurt
Sent: Tue 05/03/2013 15:45
To: [email protected]
Subject: A Form & a Strange Date Problem



I'm working on this other system of ours, where my boss complained of a
problem. I fixed one problem - but, then another problem occurred -
regarding an EMPTY() Test.



So - there's this form - to Enter Criteria for a Report. Its got numerous
date fields, each are in pairs (for a Range). So - I enter dates into a pair
of fields, and after I enter in the 2nd date field, the focus then jumps to
another date field. But, I don't enter in a Date there - and, instead - hit
the button to process the report.



As such, for that next pair of date fields - even though NOTHING is entered
on the screen for those fields, even though the cursor went into the 1st
date field - VFP reports the contents of those 2 fields as "  /  /  " and
"". The field that has the slashes - looks to me like a Standard Empty Date
type of data. But, VFP reports back as NOT EMPTY when I use the EMPTY()
function on the Value of that field on the screen.



I find this to be Strange - since, it seems to me - that it SHOULD report it
back as EMPTY!



FYI - am using VFP7. Also, the Format property of that Text field is set to
"d", and there is No InputMask set. Again - these are settings on this Form
before I even touched it.



TIA,

-K-



--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/06A203B2A0BD46C4AB9F8CF9983FCCDC@Programming2
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to