General information
Category:
Coding, syntax & commands
Bill --
Would a list box or combo box work for you? The control itself would perform the lookup. Depending on the display and behavior you want, you may want to look at the ColumnCount, BoundTo and BoundColumn properties.
Jay
>Need state lookup routine for VFP6.0
>This is a routine I used in fp2.6 to verify that the 2 digit state code you put into the state field is in the states.dbf. If it's valid it does nothing. If it doesn't get a hit on the states.dbf it opens a gaStates array showing the states fullname. You can then select the state you want and press enter to select it. Does anyone have a vfp6.0 routine similiar to this?
>Bill
>
>Note: Here is the code for the fp2.6 routine.
>
>*thisform.gotfocus()
>DO stateary && procedure is at bottom of this page
>
>*thisform.2 digit state field
>*thisform.fieldvalid()
>* States lookup table
> if !seek (this.value,"States","cState")
> lnTemp = States(Row(),Col())
> this.value = gaStates(lnTemp,1)
> endif
>
>*-------
>PROCEDURE stateary && Build States array
>* ----------
>public array gaStates[1]
>select * from states order by states.cFullName into array gaStates
>
>*states.dbf
>cstate char 2
>cfullname char 20
>
>AL Alabama
>AK Alaska
>AZ Arizona
>AR Arkansas
>etc.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only