Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Variable 'contact' not found
Message
 
To
25/01/2000 10:46:47
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00322203
Message ID:
00322208
Views:
24
Are you opening another table in the same work area as your contact table - I've known this to create this same problem.

>This is a difficult question to ask. I don't know if it will make sense or not, but I sure hope it does. I converted a project from Fox 2.6 to Visual FoxPro 6. I am having trouble with one form though. I have a form called loccont. It has a search button and a print button and a bunch of other controls on it. The search and print buttons are whats causing the problem. If I use the just the search button, I can do many different searches with no problem. But when I hit the print button, look at my reports and then try to do anything else I get the error "Variable contact cannot be found."
>
>The code that is in the search button is a call to a function BUILDCONTLIST. It builds a filter string and a print strings for use in my SQL statement. Here is the code without the building of my strings
>
>set exact off
>select contact
>set filter to &filtstring
>=setreqord()
>
>select contact.*;
>from cord!contact;
>where &filtstring;
>order by &sortstring;
>into cursor contlist
>
>go bottom in contlist
>store recno("CONTLIST") TO M.TOTCOUNT
>go top in contlist
>
>show get contlist
>show get m.totcount
>show gets -----> This is where I get the error
>
>The control source of the list box where the results are stored is m.contact, but I can't find anywhere that sets it.
>
>In my print button I call a function DLG3PRN. It just sets up a window and allows the user to print or preview a report.
>
>So the problem is when I click on print and then on search I get the error Variable contact cannot be found. It then highlites the line "show gets" in BUILDCONTLIST. If I click on ignore everything works fine and I don't get any errors after that.
>
>In the valid event of my list box I call a function and this is the code it does. This is the only place that m.contact is used.
>
>locate for contact.id = right(m.contact,10)
>if (!found() or empty(m.contact))
> if recno() > reccount()
> wait window "No matching records found..."
> set filter to
> endif
> go top
>endif
>
>I know that alot to swallow but I need some help.
>
>Thanks in advance,
>Tyler
Nigel B Coates
NBC Software Services
Dublin, Ireland.
eMail: Nigel.Coates@NBCSoftware.com
Previous
Reply
Map
View

Click here to load this message in the networking platform