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

GOTO help

Status
Not open for further replies.

lashwarj

IS-IT--Management
Nov 1, 2000
1,067
US
i have a form with a text box labeled TEXT1

I need for it to do this

Compare the value in TEXT1 to two fields
parcelid and taxkey

I need it to then go to the record it is equal to and if it is not equal to anything then produce a prompt stating invalid tax map #.
 
Is the value in the text1 equivalent to two values in the table? If
In the valid of the textbox put:
Code:
LOCAL cValue
STORE this.value to cValue
SELECT myTable
LOCATE FOR cValue = parcelid AND cValue = taxkey
IF !FOUND()
  MESSAGEBOX("Values not found")
  store "" to this.value && Or whatever
ENDIF
THISFORM.REFRESH()

P.S. I'm sure I'm missing something. The value in the textbox is to be found in two fields of the table?
 
no the value is only going ot be in one but I need them to be able to enter the number and have it search both and find the other that is eqaul.

Say if i have the parecelid I need to find the taxkey they are 2 different numbers but i want them to be able to enter thwem in the same text box and search on them. the text box is on the form. one form
 
Then just modify the code I suggested.
LOCAL cValue
STORE this.value to cValue
SELECT myTable
GO TOP
LOCATE FOR cValue = parcelid
IF !FOUND()
select myTable
GO TOP
LOCATE FOR cValue = taxkey
IF !FOUND()
messagebox("Value not found")
STORE "" TO this.value
ENDIF
ENDIF
THISFORM.REFRESH()
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top