Using access forms to build SQL Server queries

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chichbong
    New Member
    • Mar 2010
    • 2

    Using access forms to build SQL Server queries

    I have a form in an .adp file in Access 2007, and the project is connected to SQL Server 2005. The form uses a stored procedure to display records. The stored procedure does a JOIN of 2 tables, and has parameters which are passed in through the form's Input Parameters property. It compares the parameters to the corresponding columns and returns those records where there's a match. The records are returned correctly but they cannot be edited because the Unique Table property of the form is not filled in. I can't fill it in, however, because the drop-down list is empty and I can't type in the name of a table.
    I found that if I take all of the parameters out of the stored procedure (so that it returns all records), the table names appear in the Unique Table list and everything works fine. Once I put the parameters back, the Unique Table field is blank again.
    I have 2 problems. If i don't use stored procedure. I can't pass parameters from form user to queries with criteria. Views in SQL doen't accept to receive parameters from form user. I have two problems:
    1. To built queries with criteria from input form user in ADP. These result of queries are used to present in other form. So i used SP to solve this problem.
    2. edit data in these forms. But exits problem about Form's unique table property.
    If i don't use SP, i don't know how to solve first problem.
    Can you give me others methods to solve these problems,please ! Thank you very much!!! As soon as better.
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    Try posting your question in Access forum. If they can resolve your #2 faster than you can resolve your #1.

    Good Luck!!!

    ~~ CK

    Comment

    Working...