RowSource SQL query

  • Thread starter Thread starter S Derouen
  • Start date Start date
S

S Derouen

I would llike to set the RowSource for a listbox to reference a table in
another database that is one directory below the current database's
location.

Is there a way to use a relative reference such as:

list0.RowSource = "Select distinct [street_nam] from
[.\streets\streets]tblstreets;"

where the current db is say c:\access\drawings\db1.mdb and the other db is
c:\access\drawings\streets\streets.mdb?

Thanks
 
I would link the other database's table in the current database... That way, it shows up as a regular table in access that can be referenced just like a regular table... but the data is actually coming from the other database

To link a table, just right-click in an empty area of your tables window and choose "Link Tables..." you will see that the newly linked table shows up in any kind of table list, including expression builder, query builder, etc..
 
Thanks for your quick response. I am trying to develop a database (with
only forms in it) so that no matter where it is located, network share or
laptop hard disk, that it would always look for the tables in a directory
referenced below it. I may be trying to out think myself. I guess I could
set the links at run time, but was just wondering if it could have been done
the way I was trying. Thanks again.



JoeV said:
I would link the other database's table in the current database... That
way, it shows up as a regular table in access that can be referenced just
like a regular table... but the data is actually coming from the other
database.
To link a table, just right-click in an empty area of your tables window
and choose "Link Tables..." you will see that the newly linked table shows
up in any kind of table list, including expression builder, query builder,
etc...
 
Back
Top