G
Guest
I am in the process of writing a procedure to copy several tables from a
master database that we maintain in our home office to separate databases
that we send out to our subsidiaries. There are two separate destinations
(directories) for the tables. I have created a form to get the destination
deisred from the database owner.
IN VBA I reference the field on the form that contains the destination path
and store that path to a string variable "strDestination"
Next, I used the Query Builder to create the queries and copied them into my
VBA procedure as follows:
Dim strSQL As String
Dim strDestination As String
strDestination = Forms!f_Export!Product
't_Contacts
strSQL = "SELECT ContactID,ContactNUM, BusinessUnitID,Name,
Telephone,E_Mail,Lead,"
strSQL = strSQL & "Manager,Liaison,CoordLead,LastUpdated"
strSQL = strSQL & " INTO t_Contact IN " & strDestination & " FROM t_Contact;"
DoCmd.RunSQL strSQL
On executing the code, I get the message "Query input must contain at least
one tble or query. "
Any hint as to what I am doing incorrectly?
Thanks
master database that we maintain in our home office to separate databases
that we send out to our subsidiaries. There are two separate destinations
(directories) for the tables. I have created a form to get the destination
deisred from the database owner.
IN VBA I reference the field on the form that contains the destination path
and store that path to a string variable "strDestination"
Next, I used the Query Builder to create the queries and copied them into my
VBA procedure as follows:
Dim strSQL As String
Dim strDestination As String
strDestination = Forms!f_Export!Product
't_Contacts
strSQL = "SELECT ContactID,ContactNUM, BusinessUnitID,Name,
Telephone,E_Mail,Lead,"
strSQL = strSQL & "Manager,Liaison,CoordLead,LastUpdated"
strSQL = strSQL & " INTO t_Contact IN " & strDestination & " FROM t_Contact;"
DoCmd.RunSQL strSQL
On executing the code, I get the message "Query input must contain at least
one tble or query. "
Any hint as to what I am doing incorrectly?
Thanks