Dim dbpath As String dbpath = Application.StartupPath + "\" & "CDE Database.accdb" Me.DgCustomQueries.DataSource = dbpath Me.DgCustomQueries.DataMember = "Custom_Extracts" 'This is the line of code which gives me the error.
My database is called "CDE Database" and the Table that I'm trying to pull from is called "Custom_Extracts".
I've put a datagrid onto my user form and titled that DGCustomQueries
I'm setting my DataSource to call the "CDE Database"
I want to set the DataMember as my "Custom_Extracts" table.
I don't know if it will help any but I added a reference to the Microsoft DAO 3.6 Object Library.