Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding New Records
Message
From
05/07/1998 05:51:08
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Adding New Records
Miscellaneous
Thread ID:
00114309
Message ID:
00114309
Views:
40
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
Next
Reply
Map
View

Click here to load this message in the networking platform