Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2002
    Location
    London
    Posts
    7

    Question Unanswered: Linking to other Access objects eg. Queries

    I would like to re-design a database to become a 3 tier application. What I would really like to have, is a front-end application, which can draw results from queries sitting on a back-end database. Is it possible to link to a query from another Access DB? I dont want to import the query as the data would then be static.

    I would appreciate any input in this regard.

  2. #2
    Join Date
    Nov 2002
    Posts
    2

    Smile Re: Linking to other Access objects eg. Queries

    Originally posted by dicksopa
    I would like to re-design a database to become a 3 tier application. What I would really like to have, is a front-end application, which can draw results from queries sitting on a back-end database. Is it possible to link to a query from another Access DB? I dont want to import the query as the data would then be static.

    I would appreciate any input in this regard.
    You could use

    Dim DB As Database
    Dim RST as DAO.Recordset
    Dim DBQry As QueryDef

    Set DB = OpenDatabase("Your Database Locatio i.e. C:\Mydatabase\DatabaseName")
    Set DBQry = DB.QueryDefs("QryName")
    Set RST = DBQry.OpenRecordSet()


    'You will need to use
    Rst.movefirst 'Moves to first Record
    Rst.moveLast 'Moves to last record
    Rst.MoveNext ' Moves Next record
    Rst.RecordCount' Give current record count
    Rst("FieldName") = Your Info ' Links to you a specific records field

    'Closes Links
    Set DB = Nothing
    Set DBQry = Nothing
    Set RST = Nothing

    Sorry if this is not what your looking for but it may help anyway.

  3. #3
    Join Date
    Jan 2002
    Location
    UK
    Posts
    67
    I can not understand your concept of Static data form queries. If you have your data in a backedn table and your queries in the front end and link the table instead of the queries, you data will be displayed as if it is being picked up directly from the backend tables.

    Please correct me If I have misinterpreted you.

    Rohit

  4. #4
    Join Date
    Oct 2002
    Posts
    48

    Create view at Backend and link it.

    I think, there is 2 ways to solve it.

    1. Create view at Other database from that query.
    Link that view in your real database.
    So, you may get latest result from that view


    2. Link those all tables(ued in query) n your real database, and then
    Import query from that database. Run that query in real database. As real database is going to choose linked tables data, You will get latst data.

    I hope, I have given your desired answer.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •