Samsam,
A private data session allows a form to have its own data that is independent from any other forms that might be open. If you are trying to get form2 to use the data from form1 then you want form2 to have the default data session, but you want the autoclosetables property of the data...
samsam,
If these forms are both using the default datasession and form2 has the dataenvironment property AutoCloseTables set to .T. then when you exit form2 you are closing the table that the grid in form1 is using.
You will need to either set tehse forms to using a private data session so...
AndrewZ,
In the combo's Requery method put this code;
WITH This
.Clear()
.AddListItem("A",1,1)
.AddListItem("Male",1,2)
.AddListItem("B",2,1)
.AddListItem("Female",2,2)
.ColumnCount = 2
ENDWITH
JimBooth
jbooth@jamesbooth.com...
For the recrod and any lurkers here's a description of how strings are compared for equality in VFP. It is a multistep process, the steps are listed below;
With SET EXACT OFF
1) The strings are assumed equal
2) they are compared one character at a time
3) When the string on the right side of...
This discussion is interesting.
First, the two keywords PROCEDURE and FUNCTION have only one difference, spelling!
What makes a routine either a procedure or function in VFP is how you call it, NOT how you declare it.
DO Whatever && Procedure
Whatever() && Function
Any routine can be...
The NODEFAULT is needed to stop the default behavior of the LostFocus which is to move focus to the next control (or the one pointed to by the return value of Valid). The SetFocus call will move the focus for you, but if the NODEFAULT is not specified then after the SetFocus moves it the...
I would change some things in your approach. In the valid when you detect that you want focus to move to a control do this;
Thisform.Setfocusto = Thisform.Text1 && an example object
Then in the lostfocus do something like this;
IF TYPE("THISFORM.Setfocusto.Name") = "C"...
Think of the When, GotFocus, and Valid, Lostfocus methods this way;
When: Determine if focus will be allowed to arrive at the object (Return .T. allows focus to arrive, .F. disallows focus)
GotFocus: React to focus arriving (GotFocus will not fire unless When Returns .T.)
Valid: Determine if...
Gene,
The reason the only page refreshed is the visible is that it takes time to refresh things and only one page is visible to the user. There are two approaches that I use to address this situation, one slightly more complicated, but better I beleive, than the other.
The simple one;
In...
When using macro expansion the first dot marks the end of the variable name to be expanded. Anything following that is considered part of the expanded expression. So;
lcVar = "MyObject"
? &lcVar.Name && Expands to MyObjectName
? &lcVar..Name && Expands to MyObject.Name
In the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.