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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Controls

Status
Not open for further replies.

FoxStudent

Technical User
Feb 24, 2000
85
GB
I have been programming in VISUAL BASIC were I can allow the user to enter more than one incidence of a particualr vairable into an array. Alternatively I can allow the user to enter more than one incidence of a field to create seperate records. How would I create the equivalent in Visual Fox Pro 6.0 with an array\group of controls?
 
Long Sample of code, but is this what you are after.<br><br>select BIDCODE<br>sum BIDCODE.LIMIT&nbsp;&nbsp;to cnMaxCodes<br>cnMaxCodes = int(cnMaxCodes)<br>public array laPrjCode[cnMaxCodes , 4]<br><br>Code to Prepopulate array laPrjCode[x,y]<br><br>IF WVISIBLE(&quot;prjcode&quot;)<br>&nbsp;&nbsp;ACTIVATE WINDOW prjcode SAME<br>ELSE<br>&nbsp;&nbsp;ACTIVATE WINDOW prjcode NOSHOW<br>ENDIF<br>@ 1.000,2.400 SAY &quot;Project Code&quot; ;<br> FONT &quot;MS Sans Serif&quot;, 8 ;<br> STYLE &quot;BT&quot;<br>@ 1.000,26.400 SAY &quot;Code Amount&quot; ;<br> FONT &quot;MS Sans Serif&quot;, 8 ;<br> STYLE &quot;BT&quot;<br>@ 2.846,10.000 GET laPrjCode[1,1] ;<br> SIZE 1.000,6.400 ;<br> DEFAULT &quot; &quot; ;<br> FONT &quot;MS Sans Serif&quot;, 8 ;<br> PICTURE &quot;A!99&quot; ;<br> VALID iif(empty(laPrjCode[1 , 1]) , .t. , seek(M.PRJTYPE + laPrjCode[1 , 1] , &quot;BIDCODES&quot;)) ;<br> ERROR &quot;Invalid Project Code&quot;<br>@ 2.846,22.000 GET laPrjCode[1,2] ;<br> SIZE 1.000,19.800 ;<br> RANGE BIDCODES.LOW_AMT, BIDCODES.TOP_AMT ;<br> DEFAULT 0 ;<br> FONT &quot;MS Sans Serif&quot;, 8 ;<br> PICTURE &quot;@K&quot; ;<br> WHEN upper(laPrjCode[1,1]) = &quot;A&quot; ;<br> VALID between(laprjcode[1,2] , BIDCODES.LOW_AMT , BIDCODES.TOP_AMT)<br>@ 4.692,10.000 GET laPrjCode[2,1] ;<br> SIZE 1.000,6.400 ;<br> DEFAULT &quot; &quot; ;<br> FONT &quot;MS Sans Serif&quot;, 8 ;<br> PICTURE &quot;A!99&quot; ;<br> VALID iif(empty(laPrjCode[2 , 1]) , .t. , seek(M.PRJTYPE + laPrjCode[2 , 1] , &quot;BIDCODES&quot;))<br><br>..... more lines like above for the rest of the array<br><br>@ 25.846,11.600 GET lnChoice ;<br> PICTURE &quot;@*HT \&lt;Save;\&lt;Cancel&quot; ;<br> SIZE 1.769,8.667,4.167 ;<br> DEFAULT 1 ;<br> FONT &quot;MS Sans Serif&quot;, 8 ;<br> STYLE &quot;B&quot;<br><br>IF NOT WVISIBLE(&quot;prjcode&quot;)<br> ACTIVATE WINDOW prjcode<br>ENDIF<br><br>READ CYCLE MODAL<br><br>RELEASE WINDOW prjcode<br><br>Code to do what you want with the array.<br> <p>David W. Grewe<br><a href=mailto:Dave@internationalbid.net>Dave@internationalbid.net</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top