Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Array interfering with form
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01226450
Message ID:
01226459
Vues:
17
This message has been marked as the solution to the initial question of the thread.
>I have an array as shown below, which I initialize in the LOAD event of my main form for our Quality Control dept. The fields which seem to be affected are the "Spec_No" field and also the "BEND" and "WRAP" fields. As you can see below the LOAD event initializes a couple arrays for BEND and WRAP.
>
>
>WITH ThisForm
>   This.DoSets()
>   .cTable="certs"
>   * Put values into the Form's .aBend[3,2] array.
>   .aBend[1,1]="Not Tested"
>   .aBend[1,2]=" "
>   .aBend[2,1]="Pass      "
>   .aBend[2,2]="P"
>   .aBend[3,1]="Fail      "
>   .aBend[3,2]="F"
>   * Put values into the Form's .aWrap[3,2] array.
>   .aWrap[1,1]="Not Tested"
>   .aWrap[1,2]=" "
>   .aWrap[2,1]="Pass      "
>   .aWrap[2,2]="P"
>   .aWrap[3,1]="Fail      "
>   .aWrap[3,2]="F"
>
>
>I also use some code to check for state of every field to see if anything has changed. It seems that in my LOAD event, I've got changes happening to several fields, but this is not desired.
>
>Here's the code that checks for each field's state (The Table is Buffered with Optimistic Table Buffering.):
>
>LOCAL lcFieldState, llRecordChanged
>WITH ThisForm
>   lcFieldState = GetFldState(-1, .cTable) && Get the field state of the entire record.
>   IF !IsNull(lcFieldState)
>      llRecordChanged = '2' $ lcFieldState OR '3' $ lcFieldState OR '4' $ lcFieldState
>   ELSE
>   * GetFldState may return a null value, so compensate for this. It should return a string, usually.
>      llRecordChanged = .F.
>   ENDIF
>ENDWITH
>RETURN llRecordChanged
>
We were having similar problem with State combobox a while back. I think we had to set combo's ControlSource after we created the array in code or something like this to fix the problem. I may try to search for this thread later on.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform