Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...(I) have been able to get my problems solved from past messages and also new posts that other users have responded to promptly..."

Geography

Where in the world do Tek-Tips members come from?
PeterWallace (Programmer)
21 Jun 12 3:58
I have a few forms that display data in Grid .....

There s an Option to Delete a row

However where I have taken shortcut of
DELETING Record from Table and simply reloading the grid ... Often the Deleted record STILL shows ....

I have put in a WAIT A BIT 1 sec routine, after Closing The Table, and Then Reload the Grid from the table... This works


But Irritates me A> I have to pause The Updated Table and B> How do I get a PAUSE of Less than A Second ...

Peter Wallace
strongm (MIS)
21 Jun 12 5:41
Perhaps if you let the grid do the magic for you, rather than trying to take this shortcut ..(you are getting caught out by Jet's caching algorithms, and whilst it is possible to muck around with these, e.g. assuming data sourced from data environment:

CODE

DataEnvironment1.Connection1.Properties("Jet OLEDB:Flush Transaction Timeout") = 0

it isn't advised
tedsmith (Programmer)
21 Jun 12 20:13
I find that if I simply select any other row after deleting, it always stores the deletion or change of data.
Refresh doesn't always work instantly as strongm says.
I always make the grid or form invisible and execute a Moveprevious or Movenext if at record 1 when I close the form or grid in case I forget.

Usually I connect grids in code rather than a data type control and closing it and reopening always ensures changes take effect.
PeterWallace (Programmer)
22 Jun 12 4:01
I have found a bigger bugbear

I fill a table with data ( from several other Tables ) ..i,e, It is a ledger of Months Transactions

The Table is then closed and Next step in process is to use The Data Report to print the Report ... Via Datashape

When I run it ,,,, NO Detail Lines show in he report ... ( these are from The Table I just Filled )

When I debug and step through ,,, come time to pop up the table on screen ...All detail Lines are displayed ....

Debug or No ... can look at the Table after creation and It holds all the data

Perhaps If I close the connection at same time as close Table it may solve

I have let grids *do the Majic* and works ... but as said I found this when using option to delete One or Maybe 2 lines from a grid that will never have more than 5 options ,,,

( All Options at Start ... but can remove some ... but Not Add )

tedsmith (Programmer)
22 Jun 12 7:54
I too used to have similar trouble using tables to enter data or filling the datagrid cells by code so I gave away doing that.
I find it is far more reliable and in the end easier using Dynaset Recordsets with a Criteria statement to enter data from text boxes or transfer data between tables and I usually only use the datagrid to view or browse data or edit one or two cells or one row at a time.

Its easier to program when you get the hang of it.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close