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!

another mystery with sql Select

Status
Not open for further replies.

mikeisvfp

Programmer
Mar 5, 2011
91
CA
Hello Experts

Im starting to feel like sql select is evil...
I used to be able to edit records in my grid by double clicking on the record.

In the dblclick event i would have

Code:
LOCAL oform3 as Form
DO FORM frmbookapp NAME oform3 LINKED WITH appointment.appointid, customerid  NOSHOW
oform3.AutoCenter = .t.
oform3.Show(1) &&show modally
this.Refresh()

but now that I load the form with sql select and search with select I find so much more has changed. I get an error message saying "variable 'CUSTOMERID' not found" please help
 
I get an error message saying "variable 'CUSTOMERID' not found"

And what is the line of code where you get that error?

Have you used SET STEP ON to step through the code to find where that error message is coming from?

While your code above shows where you intend to get CUSTOMERID from, it does not show where you are encountering the error message.

And when you enter the FORM frmbookapp, have you used SET STEP ON to examine the environment within the Form's Load Method to confirm (or not) that what you expected to get passed, was indeed passed as expected when you first enter the Form?

Good Luck,
JRB-Bldr
 
You need to provide us with more information.

First, what do you mean by "I load the form with sql select"?

Also, what is CustomerID? Is it a variable, or is it a field? If it's a field, what table or cursor is it in? Is the table in the current work area? If it's a variable, where you are assigning its value?

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
LINKED WITH appointment.appointid, customerid

You now don't display appointment, but curappointment, don't you???

This code was even wrong from the beginning, custoemrid instead of appointment.customerid or now curappointment.customerid is referencing a field, but only if the table is currently selected, you better verbosely specify cursorname.fieldname for eery parameter, this is not a field list that needs to be abbreviated from the second field on, this is a parameter list and every parameter is seperately something completely different.

So change this to
LINKED WITH curappointment.appointid, curappointment.customerid

Of course if changing things, related things must be changed, too...

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top