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

Clipper seek from Form to Visual FoxPro

Status
Not open for further replies.

WayneBecker

Programmer
Nov 29, 2000
20
CA
I used the following code in Clipper to seek a record in a Clipper data base. The three variables are from stamp collecting where you have a Back of the Book Code a Stamp Number and a variety. How to I get the following code to work from a Form where the collector would select a stamp to view. This would be used to a query the database the return the data to a form or a view.


@ 4,07 SAY" Search Screen For Catalogue Number"
?
?
* ? BACKBOOK
IF UPPER(BACKBOOK) = "Y"
ACCEPT " Enter Back of Book Code eg. 'J' : " TO BOBNO
ENDIF
?
?
ACCEPT " Enter Start Catalogue No.: " TO CATNO
?
CATNO = INT(VAL(CATNO))

IF CATNO = 0
@ 18, 12 SAY "Scott Number too SMALL, Please Try Again"
WAIT " "
LOOP
ENDIF

IF CATNO > 5000
@18,12 SAY " Scott Number too LARGE, Please Try Again"
WAIT " "
LOOP
ENDIF

IF LEN(TRIM(STR(CATNO))) = 0
@ 18,12 SAY "Scott Number Too SMALL, Please Try Again. "
WAIT ' '
LOOP
ENDIF
?

ACCEPT " Enter Variety: " TO VARNO
?
?
*Check to see if we are inputting data against a stamp we only want one number
IF CHOICE = 1
?
ELSE
SOME = "Y"
@16,12 SAY"Do You Wish More than One Scott Number? (Y/N)" GET SOME PICT "!"
READ

IF UPPER(SOME) = "Y"
@ 16,0 SAY " "
?
?
ACCEPT" Input Last Scott Number to Review. " TO LAST
LAST = INT(VAL(LAST))
ELSE
LAST = CATNO
ENDIF

IF (LAST < CATNO)
@ 21,0 say &quot;&quot;
ACCEPT &quot; LAST Number Too Small Please Re-Input Here: &quot; TO LAST
LAST = INT(VAL(LAST))
ENDIF

ENDIF


* Find Stamp in Database
IF LEN(TRIM(BOBNO))=0
BOBNO = &quot; &quot;
ENDIF
IF LEN(TRIM(BOBNO))=1
BOBNO = BOBNO + &quot; &quot;
ENDIF

SEEK BOBNO+STR(CATNO,7,0)+VARNO

Thanks in advance for all your help................Wayne
 
Don't know anything about Clipper, but I do collect stamps so maybe I'll take a look at your code just to see what you're doing. I've started a couple of stamp programs in FoxPro, though I can't say either of them are really finished.

What I'd like to do is prepare web pages which match my album pages.

Dave Dardinger
 
Don't know anything about Clipper, but I do collect stamps so maybe I'll take a look at your code just to see what you're doing. I've started a couple of stamp programs in FoxPro, though I can't say either of them are really finished.

What I'd like to do is prepare web pages which match my album pages.

Dave Dardinger
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top