Access VBA Macro Programming

(Joao Candeias) #1
Select the radio button “Link to the data source by creating a linked table” and then click
OK. In the next screen, click the tab for Machine Data Source. Scroll down to select the DSN
you just created and click OK
You will then be prompted for a password based on the ID you used when you created the
DSN. You may think it is strange putting in the password again when you already used it to
create the DSN, but this is extra security to prevent unauthorized access.
Click OK and you will be taken to a screen listing all available tables on that database.
There may be a time delay at this point, depending on how many tables your database has. If
there are only a few, then the screen will appear instantaneously. However, I have connected
to databases that contain thousands of tables and have had to wait several minutes for this
screen to appear.
When the Link Tables screen appears, make sure you check the box for “Save Password.”
If you do not check this, a password prompt will come up when the table is opened.
Select your tables and click OK. On each table, you will need to click “Save Password” on
the message box that appears. You may also be asked to specify an index field for particular
tables. This is only required if writing data back to the tables and it is usually a unique field

244 Microsoft Access 2010 VBA Macro Programming


Figure 19-4 Linking to a DSN
Free download pdf