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

datagrid with many line but all empty?? 1

Status
Not open for further replies.

RSX02

Programmer
May 15, 2003
467
CA
Hi
I have a datagrid in a form and it supposed to display the continue of a specific table call TblStatus.
In my datagrid I can see each line that represent a record but in these line it have only one column while it supposed to have 3. And this columns and these lines are all empty. I look in the table and my records don't contain any blank fields.
This is my code

Private Sub Form_Load()
OpenDb
Set RsStatus = New ADODB.Recordset

RsStatus.CursorLocation = adUseClient
RsStatus.Open ("Select * From TblStatus"), MyConn, adOpenStatic, adLockOptimistic, adCmdText
Set DataGrid1.DataSource = RsStatus
DataGrid1.Refresh
Me.DataGrid1.Columns(0).Visible = False
End Sub

Do you have an idea why it does this?
Thanks in advance
 
Try using DataGrid1.ClearFields
Try this:
1. Remove the grid (delete it)
2. Place a NEW grid on the form.
 
Yeah that's what I did and it was working.
Do you have any idea why I didn't see my data anymore?
 
Did you set the grid's column properties through the propertypage (Right mouse click - edit), or had it previously bound to a data control and call up the fields, when it was used on another data source, or set the ForeColor to something else?
 
Yeah I played a little with the propertypage. But it was with the layout and the slip tab. Does it have an impact that I don't know about this propertypage? I guess that I should almost never use it?
Sorry about all these questions that I ask even after my problem is solved but I just don't want only to solve it but to understand also.
Thanks in advance
 
When you call up the fields for a bound grid via right mouse click, the field information is then saved. If you then use another data source, the field information is different, so "beep...does not compute..."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top