Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Table for controlsource not found
Message
From
04/11/1997 15:36:32
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00057660
Message ID:
00058215
Views:
30
>Here's an update. My form is based on a browse form class (which is based >on a base form) which has the above .Init code, a grid with .ColumnCount = >-1 and no RecordSource. When I use this form class, I put a table in the >DE, set .AutoOpenTables to .F. (so the code in my datafolder class above >will work), and set the grid.Recordsource = mytable. This works, until I >set .ColumCount > 0 and make some columns with .ControlSource = >mytable.myfield. Then it says "alias 'mytable' not found" before it can >execute any of the Form.Load code. Moving the Form.Load code from the >class to the form itself made no difference. > >I had an idea. I just made a similar form, but this time I used my base >form and put a grid on it, rather than using a form class with a grid >already in it. Everything else is the same. Now it works. So I basically >had to get the grid out of my browse form class, and put a unique grid in >each instance. That's fine, but why did this happen? Seems to me that when grid was in the class definition, it had to be instantiated earlier, i.e. before any of the events on the form; when it was on the form, it was treated as an object which could be data bound, so it was instantiated after setting up the DE, so when it's init fired in the first place, it fired before the DE, and found no tables at all. Just guessing. What would Sherlock say to this?

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform