Thank you Dan and Albert,
I may be going down the wrong road. I thought I had write code with a
connection string so that new people who use the Access database would
automatically be linked to the MySQL table. I want to avoid having to
go to each PC for a new user and create the ODBC connection. Am I way
off base here? I'm hoping for a solution that is easy to manage..
Actually you're going down the right road. The way this works is that you'll
take your data tables that were once a MS access, and move them to your
database server (oracle, Sql server, or on this case MySql).
You then delete the local tables, and replace them with what we call linked
tables to your SQL server. At this point to find most of the forms, boxes
and just about anything else who should work, with a few tweaks here and
they're needed for performance.
Once you have all of the links and application running correctly, then you
convert the application into a mde (converting to mde is not required, but
it forces you to ensure that all of your code compiles correctly), you then
distribute (place/install) this new mde on each users work station.
As a general rule the links to the sql server back should remain intact. You
certainly don't have to write any new code for forms reports or queries, or
even for those combo boxes. They should remain functional and work just fine
being linked to sql server, or remain attahced to a local table.
The only issue here to manage is to ensure that the link to MySql is active.
That obivlity means that the ODBC driver will have to be instlaled on each
workstatiion (preferably before you attempt to run your access application).
There is also the possibility that the production server you use is
different than your development, or testing debugger server. That is why I
suggested to the use DNS less code sample. This code can be run on startup
to connect to the correct data base of your choice, who once this connection
code is run, each additional lunching of the application should in fact not
require you to run that code.
So simply move and transfer your access table data to the database server,
and then replace the table names that were once the local tables, with what
is called a linked table. Your forms reports and things like combo boxes
should continue to run as before, and you'll not be fooling around
connection strings when you use a linked table.
You just have to play around and try creating a few table links to your
database server, at that point I think you'll instantly see what is going on
here. when you have a linked table in the table definitions, if you open
that it'll open up the table as if it was local, but the date is coming from
your database server....