Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Picklist Procedure to accept relations
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Title:
Picklist Procedure to accept relations
Miscellaneous
Thread ID:
00002211
Message ID:
00002211
Views:
95
I downloaded this procedure from one of Mr. Guerra websites and I would
like to know if there anyway to edit the following procedure to accept
database relations properly? For example the table fields would be
Client.name + car.carmake.

I am running it under FPW2.5.
*Use to quickly select records (PICKLIST)
* Example: DO picklist WITH 3,34,"Name+' '+Number","Pick a Customer"
* Name and Number being table fields
PROCEDURE picklist
PARAMETERS toprow,topcol,flds,tit
IF RECCOUNT() > 0
botcol=topcol+LEN(&flds)+1
flds="fields "+flds
DEFINE POPUP picklist FROM toprow,topcol PROMPT &flds TITLE (tit)
SHADOW
ON SELECTION POPUP picklist DEACTIVATE POPUP picklist
tconf=IIF(SET('confirm')='ON',SET('confirm')+' ',SET('confirm'))
SET CONFIRM ON
ACTIVATE SCREEN
previous=RECNO()
ACTIVATE POPUP picklist REST
IF READKEY()=12 AND previous <> RECNO()
IF RECNO() < RECCOUNT() OR RECNO() > RECCOUNT()
ELSE
IF EMPTY(FILTER())
GOTO previous
ENDIF
ENDIF
ENDIF
RELEASE POPUP picklist
SET CONFIRM &tconf
ELSE
* Display error message
* Can use proc MSGBELL, just remove the following comment
* DO msgbell WITH 'No Records to Choose From..',.5
ENDIF
RETURN
Next
Reply
Map
View

Click here to load this message in the networking platform