Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange grid
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Strange grid
Miscellaneous
Thread ID:
00183883
Message ID:
00183883
Views:
62
The song "Strange Days" is running through my head for some reason.

I have a form designed for editing a "code-lookup" table (table of codes for a coded field in the app's main table). It's painfully simple: a four-column grid and five command buttons, Add, Save, Cancel, Delete, Close.

The grid columns are:
1) the code for the grid (two digits stored in 2 char field).
2) the description of the code (40 char).
3) the code of another code-lookup table (two digits stored in 2 char field).
   (This code may have an association to a code in the second table.
   If so, the user choosing this code forces the choice of the other code
   in the form for editing the main table's records.)
4) a flag for the code being obsolete (logical field, presented as Y/N).
My problem is with column 3. Notice the code may have an associated code in the other lookup table. So the field may be a code from the other table, or may be blank. My problem: if it's blank, the grid column says .NULL.. No, I know what a NULL is. I said it's blank, and it says .NULL.! It IS NOT NULL! I typed spaces into it! After typing spaces into it, if I open the table from the command window, move to the one record with a blank there, ISNULL(thatfield) is .F., EMPTY(thatfield) is .T.. LIST command also shows it to be a space, although I don't know, LIST might show a NULL value as plain space.

I've double- and triple-checked that the form is opening the table I think it is (not the development copy). Which has become irrelevant, because I replaced the NULL field with spaces in both the test/development area and the live area anyway.

I even closed out of VFP several times after changing the table, and rebooted, just to make sure some sort of weird buffering/disk-caching issue wasn't keeping the old data (or an old copy of the form) in my computer's memory.

How can a textbox in a grid show .NULL. when the ControlSource contains two spaces? (Note: the column's InputMask is '##'. No Format property. No InputMask or Format property in the contained textbox.)

I'm turning gray over this. Please help. (snif)

TIA,
Rich Addison, Micro Vane, Inc., Kalamazoo, MI
Relax, don't worry, have a homebrew.
- Charlie Papazian, The New Complete Joy of Home Brewing
Next
Reply
Map
View

Click here to load this message in the networking platform