Solved

Datagrids updates when I don't want it too.

Posted on 2002-04-15
5
145 Views
Last Modified: 2010-05-02
I have a datagrid that I use just as a reference for the user to double click on the record they want to use

Private Sub dtgErr_DblClick()
Dim frmDet As New frmErrDetail
frmDet.TransId = dtgErr.Columns(1)
frmDet.BatchId = dtgErr.Columns(0)
frmDet.Fil = cboErrs.Text
dtgErr.col = 0
frmDet.Show vbModal
Unload frmDet
Set frmDet = Nothing

adoCon.Refresh
dtgErr.ReBind
Call CheckLastRec

End Sub

The call and the frmDet do not do anything to the datagrid
when I go back to the datagrid it update the column 0 with whatever I have double clicked on.  
All I want to do is refresh the datagrid.

0
Comment
Question by:clangl
  • 2
  • 2
5 Comments
 
LVL 2

Expert Comment

by:Ber
ID: 6943194
Could it be something as simple as changing

dtgErr.ReBind
to
dtgErr.Refresh

...?
Ber...

0
 

Author Comment

by:clangl
ID: 6943205
unfortunately.... I tried that...
0
 
LVL 2

Accepted Solution

by:
Ber earned 100 total points
ID: 6943215
Have you tried requerying the database with something similar to this

Select * from tablename

and then rebinding or refreshing the datagrid. Unfortunately I cannot write any code at the moment as I had a major system failure in the last couple of days and have lost Office(so no database software) and am getting some strange results from VB but give it a try and see
...
0
 
LVL 49

Expert Comment

by:Ryan Chong
ID: 6943786
Refresh the DataSource of DataGrid, example:

Adodc1.Refresh ?
0
 

Author Comment

by:clangl
ID: 6946417
I've tried that too.  If I go into debug mode it does not do it.... I am at a loss
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now