04-16-2004, 08:34 AM
Is it possible to bind data from a recordset to a datagrid,like you can do with text boxes
for example, txtID = rs!ID
Thanks for your help!
04-16-2004, 08:56 AM
04-16-2004, 09:05 AM
I tried that and got an error,I think problem is the fact that there are a lot of null values in the database i am referencing.I know how to fix this problem for text boxes but not data grids any ideas??
Thanks again 4 ur help
04-16-2004, 09:10 AM
if the recordest is opened succesfully there should not be any problem with displaying it in the datagrid.
You mentioned an error, what is the error description saying?
04-16-2004, 09:17 AM
Its pointing to the datasouce and says the method or data member is not found
The recordset is working perfectly for adding the same data to text boxes on the same form
04-16-2004, 09:28 AM
Could you show the code including how you are opening your recordset.
04-16-2004, 09:32 AM
Dim conn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Private Sub Form_Load()
Dim ConnStr As String
ConnStr = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source= H:\x.mdb; JET OLEDB:"
conn.ConnectionString = ConnStr
'Open the connection
'Print the fact that the connection has been successful to the screen
Debug.Print "Connection Object Created"
rs.Open "SELECT * FROM ModelDescription", conn, adOpenDynamic, adLockOptimistic
Public Sub LoadData()
DataGrid1.DataSource = rs
Text1 = rs!x
Text2 = rs!x
04-16-2004, 09:37 AM
Set DataGrid1.DataSource = rs