Hi guys,
I am trying to export an access query as a table in another database. The table name and query names are static but the filepath is dynamic. I would like to derive the filepath from a textbox on a form. So if you hardcode the path below where it says "TXTBOX FILEPATH" it works fine but if I try to insert the textbox value I get invalid qualifier compile error.
Here is what I tried:
Any ideas as to what I obviously did wrong?
Thanks
I am trying to export an access query as a table in another database. The table name and query names are static but the filepath is dynamic. I would like to derive the filepath from a textbox on a form. So if you hardcode the path below where it says "TXTBOX FILEPATH" it works fine but if I try to insert the textbox value I get invalid qualifier compile error.
Code:
DoCmd.TransferDatabase acExport, "Microsoft Access", "TXTBOX FILEPATH", acTable, "Sdata", "sloc", False
Here is what I tried:
Code:
Private Sub Command59_Click()
Dim destination As String
destination = ([Forms]![frm_append]![Text57])
DoCmd.TransferDatabase acExport, "Microsoft Access", (destination), acTable, "GIS data locations - soil", "soilloc", False
End Sub
Any ideas as to what I obviously did wrong?
Thanks