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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

recordsource from another database

Status
Not open for further replies.

44nato44

Programmer
Dec 12, 2008
115
NL
Hi

Not sure if this is possible, but I would like to have a recordsource from another database.

I have seen that it is possible with a sql string with the IN function but I cannot get that to work.

I hope somebody here can help.

my code :

strsql = "SELECT * FROM [TBL_Users] IN [;DATABASE=" Currentproject.path & "\DBName.mdb;"

me.recordsource = strsql

It comes up with a syntax error in the FROM clause ?

Is there something else than using a sql string
 
Why not simply this ?
strsql = "SELECT * FROM TBL_Users IN DBName.mdb"

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
MajP

I do not want to link as then some of the users of the database can see the table which they should not.

PHV

Sorry that did not work either, same error message
 
And this ?
strsql = "SELECT * FROM TBL_Users IN " & CurrentProject.Path & "\DBName.mdb"

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I do not want to link as then some of the users of the database can see the table which they should not

IMHO no users should be able to see any tables in a multiuser environment. If you allow access to the query builder then you can hide specific tables.
 
I am working on a MS Access 2000 and I found that using the build in user security is not that handy.. so I allways try to find another way of doing things. (might not allways be the best I guess)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top