linking to server view problem

G

Guest

Hi there

im linking a view on an ms sql server to my access database using VBA using
DoCmd.TransferDatabase acLink, etc.etc.

How ever, I can NOT get the `Select Unique record Identifier` pop up to stop
coming up when the link is being made. I dont care about needing a unique
identifier, its a read only record source.

The only way ive found is using sendkeys command to cancel the popup -
however this can not be relied on, if it happens when the user doesn't have
the access window in focus, it fails and the pop up still appears.

That pop up is way beyond many of my users to even press cancel and looks
very unprofessional having to cancel it when its not needed.

any ideas? (even if it means a buttload of code)

many thanks

martin
 
A

Alex Dybenko

Hi,
if you need it read-only - then better idea is to make a pass-through query,
with SQL:
Select * from MyView
 
G

Guest

Many thanks for the idea

However, my ODBC information is dynamic, and pass through ODBC connection
str. seems to be a static string (cant even use a calculated value) - my
tables are (re)linked dynamically (it may happen several times a week, day or
hour) so theres no problem there, but having to e.g. trawl through query
definitions and update odbc connection strings by e.g. code every time this
happens isnt going to be ideal in the least :(

generating entire queries on the fly is _not_ an option

any ideas (either to the original problem or to using pass though queries
and making their odbc connection str dynamically updatable)?

many thanks

martin
 
R

Rick Brandt

Babbage said:
Many thanks for the idea

However, my ODBC information is dynamic, and pass through ODBC connection
str. seems to be a static string (cant even use a calculated value) - my
tables are (re)linked dynamically (it may happen several times a week, day or
hour) so theres no problem there, but having to e.g. trawl through query
definitions and update odbc connection strings by e.g. code every time this
happens isnt going to be ideal in the least :(

generating entire queries on the fly is _not_ an option

Changing the ODBC information on a PassThrough query is actually easier than on
a link.

CurrentDB.Queries("QryName").Connect = "whatever you need"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top