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

datagrid problem

Status
Not open for further replies.

VBmim

Programmer
Jun 25, 2001
361
BE
I use a form with a button, when I click on the button I show the datagrid. When I click the button again, the datagrid dissapears. When I show the datagrid for the first time, the first cell of the first row is empty. When I show the datagrid for the second time, the cell is filled. Can anyone help me?
tnx

Mim
 
This is it:

Private Sub cmbSeizoen_ButtonClick()
If DataGrid1.Visible = True Then
DataGrid1.Visible = False
Else
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "SELECT * From Seizoentypes order by seizoentype"
Adodc1.Refresh
DataGrid1.Visible = True
DataGrid1.SetFocus
End If
End Sub
 
Well actually I don't know whats the problem because I tested it and it worked. Maybe you got something wrong with your adodc connection. Is your DataGrid property "DataSource" properly set to your Adodc1?
 
My datasource is set allright. I changed my sql-query and the problem was gone... I realy don't understand it. Visual Basic has his own life on my computer, and it likes bugging(!) me...
thanx for your help anyway

mim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top