Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to create an array of form properties 2

Status
Not open for further replies.

gaelin

Technical User
Jan 13, 2004
35
US

Using VFP7/8. Want to be able to save the values of the form properties if an error is encountered. Currently capture the calling process, status, memo, etc. But not the values of form variables. How do I do that?
 


PEMSTATUS()

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 

I've looked at PEMStatus and it does not appear to offer what I want. If I set a form property to a value of "6705", I want to be able to see what value was set in the event of an error.
 
You can create an array of the property names using AMEMBERS(). Then loop thru the array and get the values using GETPEM().

Jim
 
gaelin,

Use the AMEMBERS() function to get a list of all the properties, procedures and member objects into an array. Then use GETPEM() to get the value for each property.


-BP (Barbara Peisch)
 
If you're talking about the values of controls on the form, you could cycle through them quite easily with a loop:

FOR EACH thiscontrol IN thisform.controls
if PEMSTATUS(thiscontrol,"value",5)
?thiscontrol.name,thiscontrol.value
endif
ENDFOR

Keith
 

Thanks JimStarr and bPeisch. That meets my needs!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top