Solved

Datagrids updates when I don't want it too.

Posted on 2002-04-15
5
158 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 52

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

739 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