Hi All
I have the following code to transfer objects to other access databases. I have created a form to provide the necessary information such as object type, name, destination to make it easy just to select the options and then transfer the selected database objects.
I am retrieving the options from combo boxes. Where I am getting the problem is with the ObjectType. Because the output from the combo box is a string I get a Type mismtach error. If i remove the reference to the combo box and enter an object tpye in (e.g. acModule) it works fine, so I know the rest of the expression must be ok. I have been looking for ways to get it to treat the string literally but have been unsuccessful.
Any ideas??
Help appreciated as always.
Thanks
Tim
I have the following code to transfer objects to other access databases. I have created a form to provide the necessary information such as object type, name, destination to make it easy just to select the options and then transfer the selected database objects.
Code:
DoCmd.TransferDatabase transfertype:=acExport, _
databasetype:="Microsoft Access", _
databasename:=Me.cmbDestination, _
ObjectType:=Me.cmbObjType.Column(1),
Source:=Me.cmbObjName, _
Destination:=Me.cmbObjName
I am retrieving the options from combo boxes. Where I am getting the problem is with the ObjectType. Because the output from the combo box is a string I get a Type mismtach error. If i remove the reference to the combo box and enter an object tpye in (e.g. acModule) it works fine, so I know the rest of the expression must be ok. I have been looking for ways to get it to treat the string literally but have been unsuccessful.
Any ideas??
Help appreciated as always.
Thanks
Tim