Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding New Records
Message
 
To
07/07/1998 13:44:48
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00114309
Message ID:
00114992
Views:
13
Hi John,

This problem was there in VFP3 and then 5 and possibly 6 too. The first page is automatically refreshed or I shall say the default ActivePage. For the others, you need to issue the refresh manually from each page. Things are different when it comes to grids because, sometimes the auto refresh to bring in the data associated with RecordSource.

>I put the Refresh() as suggested--works like a charm. Still don't understand why it works in grid form and not in page form, but the bottom line is IT WORKS! Thanks a ton, guys, for helping me out of this one.
>
>John
>
>>Hi John,
>>
>>You need to add this.Refresh() in the Activate() event of each page. Moreover, I think there are some classes available for download on the UT download which handle this automatically.
>>
>>>This sounds really weird, but it keeps happening: I have a form with multiple tabs, each of which pretty much deals with a separate table. Optimistic table buffering is set. Some of the tabs have grids. Adding records in those tabs works exactly as expected. However, on those tabs without grids, i.e., where the fields for one record are placed separately on the tab, adding records works as follows:
>>>
>>>If I try to add the first record for a specific client into a table, none of the controls are enabled, as if I were pointing to EOF. I am, however, pointing to the new record. If I go ahead and save it, my add method for that client works as expected from then on. However, if I change to a client that has no record in the target table, I must save a blank and then INSERT another before I can work with new records.
>>>
>>>The cmdAdd.Click method has the same simple lines of code for both grid and non-grid tabs, where ClCode is the foreign key:
>>>
>>>INSERT INTO /*TABLENAME*/ (ClCode) VALUES (Client.ClCode)
>>>This.Parent./*FIRST CONTROL ON TAB*/.Setfocus()
>>>
>>>A relationship to the parent is established in the DE and a filter on the ClCode is in place. (Removing the filter doesn't change anything.)
>>>
>>>Has anybody ever seen anything like this? I know I can devise a work-around, but this ain't right . . . . .
>>>
>>>TIA.
>>>John
Previous
Reply
Map
View

Click here to load this message in the networking platform