Solved

Datagrids updates when I don't want it too.

Posted on 2002-04-15
5
150 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 50

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

832 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