I'm using the function below to link data from an Oracle database into access. I run it as an expression in a query based on a table that contains all the table names:
Expr:imp_data([TABLE_NAME])
Function imp_data(cField)
DoCmd.TransferDatabase acLink, "ODBC", "ODBC;DSN=geneva_for_cw;UID=geneva_admin;PWD=geneva_admin;SERVER=GENEVA-EAG;", acTable, "geneva_admin." & cField, "geneva_admin." & cField, False
End Function
However it executes twice - in fact it sometimes produces up to 4 instances of the tables! There's a lot of tables - so I use a Like "ACC*" to select all the ACC* tables.
Can't see why.
Any thoughts appreciated - may not be the best way to do this, but you'd think it would work.
Expr:imp_data([TABLE_NAME])
Function imp_data(cField)
DoCmd.TransferDatabase acLink, "ODBC", "ODBC;DSN=geneva_for_cw;UID=geneva_admin;PWD=geneva_admin;SERVER=GENEVA-EAG;", acTable, "geneva_admin." & cField, "geneva_admin." & cField, False
End Function
However it executes twice - in fact it sometimes produces up to 4 instances of the tables! There's a lot of tables - so I use a Like "ACC*" to select all the ACC* tables.
Can't see why.
Any thoughts appreciated - may not be the best way to do this, but you'd think it would work.