Linking MySQL via ODBC tables using VBA

pozzo

Registered User.
Local time
Today, 00:54
Joined
Jan 23, 2004
Messages
26
Hello

I have a MS Access application (Front End) working with linked tables from MySQL (Back End). I can link the tables manually using MySQL ODBC but I need to permit the user to choose which MySQL table he/she wants to link.

For example, if he/she wants to analyse the month of september 2007, he/she would choose the table named "2007_sep_data" from a list of possible tables to choose.

I think it´s something like the code below, but I don´t know how to adapt it to my case.

Where do I get "things" like DSN=DataSource1;UID=User2;PWD=www?

Any help?

Thanks in advance

Renato


DoCmd.TransferDatabase acLink, "ODBC Database", _
"ODBC;DSN=DataSource1;UID=User2;PWD=www;LANGUAGE=us_english;" _
& "DATABASE=pubs", acTable, "Authors", "dboAuthors"
 

Users who are viewing this thread

Back
Top Bottom