I have encountered a strange and interesting problem
I have a one to many form. The child table records are in a grid.
In the WHEN event I check if the child table has a record with the present foreign key, if not, I insert a blank record with the appropriate foreign key. When user reaches last column of the row, in its valid event, I do the following:
APPEND BLANK
REPLACE FOREIGN KEY WITH PARENT.PRIMARYKEY
KEYBOARD "{DNARROW}"
Now I have two two rows in the grid. In the second row, when the user reaches the last column a new record should be added and it is (shows in the status bar) but does not show in the grid. If you go agian to the last column and press enter, gives error message RECORD IN USE BY ANOTHER USER.
This happens every time.
BUT. When a new record is added and the second row appears and I do not add anything but go to the first row, come back to the second row, then the adding routine works perfectly. In my valid clause, if I issue a Keyboard down then up then down after the replacement of the foreign key, every thing works perfectly. I have had no problems for the last two months and thousands of records have been added.
Any clues.
In the data environment, only the parent and child tables are related with buffering set to 5.
Is MS hiding something from us?
Regards
Abdul Ahad Khan