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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update view does not show unsaved record

Status
Not open for further replies.

AlastairOz

Technical User
Jul 27, 2010
81
AU
I am now using a view for the row source for my grid.
I have text boxes above the grid for data entry.

When I add a record to the table, the text boxes go blank as required to enter the new data, as the control source for the text boxes is the table.
When I APPEND BLANK,I requery the view.
But I don't see the new record in the view until I save the record.
Is this normal?.
I want to set the control source of the text boxes to the view, so the user can scroll up or down the grid, to the record to be changed, with the names appearing in the text boxes.
If I set the control source of the text boxes to the view,
when I add a record I don't get empty text boxes and I can't type in the new data. It just overwrites the last entry.
Any ideas?

 
I think I have solved it.
I set the option
SET DELETED off
in the form load.
it was set to ON

It now works. But is this the right way to do it?
 
Except now I am seeing all the deleted records...
Any advice?
 
If you want to work with a view, then work with the view only.
You need an updatable view of course. And you best set the view to table buffering.

Don't APPEND BLANK to the table, APPEND BLANK or INSERT into to the view. But don't requery the view, because that of course removes all the changes and requeries data from the table. You save all changed, deleted or new records within the view with TABLEUPDATE(), only after that a requery makes sense to see updates of other users.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top