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!

Cannot access the selectec table 2

Status
Not open for further replies.

prustie

Programmer
Aug 6, 2001
34
GB
Hi

I have a VFP6.0 application running which has an initial program which then calls a Top Level form from where others forms are called.

Thus when running you can see two items on the taskbar one for VFP and one for the application.

In general the application is running well but I am getting a 1152 error from time to time at some sites and quite frequently at one site.

The strange thing is that the error seems to ignore the ON ERROR condition which is set to produce a formatted message on the screen and write details to a file. It just comes up with the standard message and appears in the Visual Foxpro Screen.

Althought it always occurs when exiting a certain form as I am finding it almost impossible to produce the error on my own system I cannot pinpoint the problem any further.

Has anyone any idea of what might be going on and particularly why the ON ERROR is ignored.

Thanks.

Malcolm P.
 
Hej !
Look at my thread184-452952. May be you find something helpful. Kind regards from Warszawa!!!!!
I'm inviting all members of T-T to Poland !!!
Monika (monikai@yahoo.com)
 
Hi Malcom,

"Cannot access the selected table" is a notorious error. The message is unrelated to the cause, and it is one of the few errors which do not invoke your error handler (don't ask me why).

A common cause for the error is if you have a table or cursor used as the RowSource for a listbox or combo box, and you close the table before the listbox or combo box is destroyed. Make sure you close the tables in the form's Destroy, or by setting AutoCloseTables to .T. in the data environment.

You might also see the error if you are using the same table or cursor as the RowSource for more than one combo or listbox on the same form.

Do either of those scenarios apply in your case?

Mike Lewis
Edinburgh, Scotland
 
Hi MIke

Thanks for the tips.

Can you get the same error with a grid?

By the way have you ever lived in the States? Probably a different Mike Lewis.

Regards

Malcolm P.
 
Malcom,

Can you get the same error with a grid?

No. The grid has an entirely different way of misbehaving when you close its data source. (You want consistency?)

By the way have you ever lived in the States?

Yes, but not recently. Mike Lewis is a very common name. Mike Lewis
Edinburgh, Scotland
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top