I've just switched from using the data controls to using variables to link with Access. But with the data control I could easily setup the datasource property in designtime. But now, I can't seem to setup the link between the flexgrid and the database. Here's my code so far:
But this gives the "Type Mismatch" error. I've also tried to use "Set FlexStatDay.DataSource = dbStats" but that gave me the "Object variable not set" error, and I've also replaced the dbStats with rsStats.Code:Public dbStats As Database Public rsStats As Recordset Set dbStats = OpenDatabase(App.Path & "\Stats.mdb") SQL = "Select * From Day" Set rsStats = dbStats.OpenRecordset(SQL, dbOpenDynaset) FlexStatDay.DataSource = dbStats
Can anyone help me out?
Dave.




Reply With Quote