Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DSN-less ODBC Connection & Package & Deployment Wiz

Status
Not open for further replies.

Sensibilium

Programmer
Apr 6, 2000
310
GB
Can anyone help? I need to create a DSN-less connection from VBA code for a 32-bit ODBC connection to Sage Line 50 (v6), due to the package and deployment wizard always falling over with my linked tables to Sage (It always pops up a dialog mid package building saying 'Error: Subscript out of Range'. I click OK, and it just carries on packing the front-end).<br><br>The reason as to why I know its the linked Sage tables, is because the same error occured when splitting my db, and would only go away if I deleted the link tables first.<br><br>I have tried keeping the linked Sage Tables within the back-end, and then linking to them from the front-end, but nothing seems to stop the 'Subscript Out Of Range' error...<br><br>I did see a DSN-less connection subroutine in Alison Baxters Access 2000 book, but I can't find it anywhere in the book anymore (which is weird...).<br><br>~Maybe~ I don't actually need a DSN-less connection to ODBC, as all the machines I want to install the front-end on has the same DSN installed, but I still need to stop the subscript range errors.<br><br>Any help would be greatly appreciated.
 
Subscript out of range (Error 9)<br>You referenced a nonexistent collection member.<br><br>Try adding a more explicit error trap <br>Like this one which tells excatly which sub is causing the error.<br>----------------------------------<br>Err_xxxxx:<br>&nbsp;&nbsp;&nbsp;&nbsp;Select Case Err.Number<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Case 3021<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' No current record<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Case Else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MsgBox &quot;Error # &quot; & Err.Number & &quot;&nbsp;&nbsp;&quot; &Err.Description, vbInformation, &quot;In sub xxxxxxx&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resume Exit_xxxxxx<br>&nbsp;&nbsp;&nbsp;&nbsp;End Select<br>-----------------------<br>This may shed some light on which sub or function is causing the error. And perhaps a work around.<br><br>First rule in troubleshooting &quot;Don't assume anything&quot;<br> <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.
 
Thank you, I'll have to do that.<br><br>Should I write error trapping in all my subroutines? That may take some time... I have a habit of skipping the error-trapping...<br><br>I have set up VerifyLink, etc. relinking functions and subs for my linked tables as shown in the Alison Baxter Access 2000 book, but when I browse for the mdb back-end and select it, it bombs out with 'Cannot run app without locating Data Tables'... Would it be an error in the code? I've created the BDInfo class as well, and the whole thing compiles...<br><br>Why Package? Then Deploy? When you get run-time files in both?<br><br>Thanks for your help again DougP&nbsp;&nbsp;:)<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top