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

Why Does Grid Show Old Data When Reloading A Form

Status
Not open for further replies.

drosenkranz

Programmer
Sep 13, 2000
360
US
Hello There,

I have a grid that is using a local view to display a "case type" code and the description of the code to the user. If the user changes a code, exits the form, and then reopens the form, the grid still shows the "old" data for that last change until that cell in the grid gets focus. It then changes to the correct data. WHY?

1) is tableupdate() in the cmdExit.Click event the proper way to update the record?

2) How do I get the grid to reflect the latest data in the local view when it reloads?

Thanks.
The 2nd mouse gets the cheese.
 
Make a save method in your form and call it from a save button and when the user leaves the form (usually you ask the userm if he/wshe wants to save changes, when leaving a form (in the QueryUnload event, when this method returns .F. the form is not destroyed enabling you to ask your user "Save changes ?" Yes/No/Cancel).

In the save method you can do a tableupdate and a requery on your view, possibly a refresh of the form (the requery on the view should take care of this ,though).

HTH,
Weedz (Wietze Veld)
veld4663@exact.nl
The Netherlands

They cling emotionally to code and fix development rather than choosing practices based on analytical assesments of what works best.

After the GoldRush - Steve McConnell
 
My cmdExit Button has the following code behind it.

TABLEUPDATE()
REQUERY()
THISFORM.REFRESH()
THISFORM.RELEASE

It does not work. I still see the "old" value the next time I open the form again. The old value is still in that last cell I had last changed on the form until that cell gets focus- then it displays the actual field value correfctly. I have noticed that if I click on another record in the grid (move the record pointer), the information is correct the next time I launch the form.

Why does the form re-open with old data in that cell until It gets focus?
The 2nd mouse gets the cheese.
 
Hey Again,

I switched from row buffering to table buffering and it works now. This happens to be a small look-up table but I wanted to use a similar grid for a much larger table.

1) Can anyone tell me why I have to use table buffering?

2) Will table buffering cause a performance problem with larger tables?

Thanks again for your help.
The 2nd mouse gets the cheese.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top