I am trying to write an MS ACCESS VBA application that has the code in one *.accdb file and the data itself in a separate *.accdb file.
I am trying to set the RecordSource property of a SplitForm to all the elements of a table (Table1) in the external database, but don't know how to properly express the combination <DBname>.<Table Name> for that function.
The following Code does NOT work, but almost does
Error Message:
The record soruce "Select * from Table1" specified on this form or report does not exist.
The error message I'm getting basically says that Table1 doesn't exist. I see this as a problem naming Table1 as part of the external database. How do I do that?
Thanks... TGlagowski
I am trying to set the RecordSource property of a SplitForm to all the elements of a table (Table1) in the external database, but don't know how to properly express the combination <DBname>.<Table Name> for that function.
The following Code does NOT work, but almost does
Code:
Dim myQuery As String
myQuery = "Select * From Table1"
Set gSplitViewForm = New Form_TestTable
gSplitViewForm.RecordSource = myQuery
gSplitViewForm.Visible = True
gSplitViewForm.SetFocus
The record soruce "Select * from Table1" specified on this form or report does not exist.
The error message I'm getting basically says that Table1 doesn't exist. I see this as a problem naming Table1 as part of the external database. How do I do that?
Thanks... TGlagowski
Comment