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

pushbutton code quandry

Status
Not open for further replies.

jlockley

Technical User
Nov 28, 2001
1,522
0
0
US
My question: Why do I get different results in the Tracer Window, for what appear to be identical parameters? Obviously I am missing something.

Trying to determine the location of an unassigned variable in the following script I used the tracer window I see the following under the third segment

A foreshortened version is below. The form and the script are can be seen respectively at and
A second question will be posted seperately. Thank you for any help you can provide.

#Button3::pushButton:412=> if StNAME.isBlank() then
#Button3::pushButton:413=> StNAME = "Check"
#Button3::pushButton:418=> if stLOCATION.isBlank() then
#Button3::pushButton:419=> stLOCATION = "Check"
#Button3::pushButton:424=> if stTITLE.isBlank() then
;snip
#Button3::pushButton:605=> if stInn_Bed_Breakfast.isBlank() then
#Button3::pushButton:608=> stInn_Bed_Breakfast = "Check " + stInn_Bed_Breakfast
#Button3::pushButton:611=> if stLodge_Guest_Ranch.isBlank() then
#Button3::pushButton:613=> else Lodge_Guest_Ranch = "Check" + stLodge_Guest_Ranch


Notice that stName produces”
#Button3::pushButton:412=> if StNAME.isBlank() then
#Button3::pushButton:413=> StNAME = "Check"

While stInn_Bed_Breakfast produces


method pushButton(var eventInfo Event)

var

stNAME String
stlocation String
stTITLE String
stPARTNER String
stENTRY_DATE Anytype
stTelephone String
stFax String
;snip
stInn_Bed_Breakfast String
stLodge_Guest_Ranch String
endvar

stNAME = fldNAME.value
stLOCATION = fldlocation.value
stTITLE = fldtitle.value
stPARTNER = fldPARTNER.value
stENTRY_DATE = fldentry_Date.value
stTelephone = fldtelephone.value
stFax = fldfax.value


;============================== Parameters

if StNAME.isBlank() then
StNAME = "Check"
else
StNAME = "Check " + StNAME
endif
;.................
if stLOCATION.isBlank() then
stLOCATION = "Check"
else
stLOCATION = "Check " + stLOCATION
endif
;.................
if stTITLE.isBlank() then
stTITLE = "Check"
else
stTITLE = "Check " + stTITLE
endif
;.................
if stPARTNER.isBlank() then
stPARTNER = "Check"
else
stPARTNER = "Check " + stPARTNER
endif
;.................
if stENTRY_DATE.isBlank() then
stENTRY_DATE = "Check"
else
stENTRY_DATE = "Check " + stENTRY_DATE
endif
;.................
if stTelephone.isBlank() then
stTelephone = "Check"
else
stTelephone = "Check " + stTelephone
endif
;.................
if stFax.isBlank() then
stFax = "Check"
else
stFax = "Check " + stFax

endif
;……………
if stLodge_Guest_Ranch.isBlank() then
stLodge_Guest_Ranch = "check"
else
Lodge_Guest_Ranch = "Check" + stLodge_Guest_Ranch
endif
;.................
if stMaritime.isBlank() then
stMaritime = "Check"
else
stMaritime = "Check " + stMaritime
endif
;……………….

quQuery = QUERY

ANSWER: : C:WORKING:results.DB

C:Working:newrol.DB | NAME | LOCATION | TITLE | PARTNER | ENTRY_DATE | Telephone |
| ~stNAME| ~stLOCATION ~stTITLE | ~stPARTNER | ~stENTRY_DATE | ~stTelephone |

C:Working:newrol.DB | Fax | Wphone | Cell_pgr | e_mail | web_site | Address | City |
|~stFax | ~stWphone | ~stCell_pgr | ~ste_mail | ~stweb_site | ~stAddress | ~stCity |

C:Working:newrol.DB | State | Zip | Country | Information | Preferred_Location |
| ~stState | ~stZip | ~stCountry | ~stInformation | ~stPreferred_Location |

C:Working:newrol.DB | Inn_Bed_Breakfast | Lodge_Guest_Ranch | | ~stInn_Bed_Breakfast | ~stLodge_Guest_Ranch |

C:Working:newrol.DB | Lodge_Guest_Ranch | Rd | COMM | CTG | FS | DELI_HRM |
| ~stLodge_Guest_Ranch | ~stRd | ~stCOMM | ~stCTG| ~stFS | ~stDELI_HRM |

ENDQUERY

errorTrapOnWarnings(Yes)
quQuery.writeQBE(":Work:Query.QBE")
try
quQuery.executeQBE()
tvResults.open("C:Working:results.DB")
tvResults.wait()
tvResults.close()
onFail
errorShow()
msgStop("", "")
endTry
errorTrapOnWarnings(No)

endMethod
;Note: this has been shortened
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top