Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid displays too many fileds
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00007411
Message ID:
00007487
Views:
27
>>I'm using a Grid to display the content of 3 fields
>>from a temporary file. The file is created after the user presses "Add" and only then the grid becomes visible to the user. The temporary file is erased when the user exits the form. The RecordSource and ControlSource properties are changed immediately after pressing "Add" and everything works fine in the first round.
>>
>>However, in the second round, when the I attempt to press "Add" again, the same procedure that worked fine before, fails: Instead of displaying just 3 fields, the grid displays all of the fields of the temporary file in disable colors. It's as if the propgram ignores the same commands it recognized before.
>
>Erez
>
>How are you creating the Temp files?
>
>Tom

Hi Tom,

Here's how:
FUNCTION MakeTempFile
PARAMETERS m_Extension
PRIVATE m_TempName
PRIVATE m_Exist
* PRIVATE m_Extension
PRIVATE m_Directory
PRIVATE __Prefix
__Prefix = ".tmp"
m_TempName = ""
m_Exist = .T.

DO WHILE (m_Exist)
m_TempName = alltrim(SYS(3))+__Prefix
IF (!FILE(m_TempName))
m_Exist = .F.
ENDIF
ENDDO

RETURN (m_TempName)
----------------------
Erez Miller
visual@visual.co.il
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform