Results 1 to 2 of 2
  1. #1
    Join Date
    May 2002
    Location
    Dallas
    Posts
    1

    Unanswered: Form RecourdSource with Parameterized Query. Possible?

    I'm hving a syntax problem with actually modifying the recordsource of a form to use a parameterized query, but I don't want teh parameter box to pop-up for the user.

    I'd rather names the parameterized query, then pass the parameter value to it, in code, and have the fom's resordsource be updated accordingly.

    Access 97 is the version.

    I would mere write the queries out in code, but I am running out of space, and I am also preparing the application for an upgrade to SQL Server, where I intend to use stored procedure to return my datasets.

    My frustration comes in that I AM ABLE to modify the form's recordsource with straight select queries, no problem.

    I am also able to run a parameterized query to get a resocrset, but I can't seem to get the recordset to be the form's recordsource.

    I really just need to be able to name the parameterized query, fill the variables it is expecting, then have the form show just those the records returned.

    Thanks in advance for the help.

    Rick W.

  2. #2
    Join Date
    Feb 2002
    Posts
    403
    Use the query as an SQL statement in code, and pass the variable to it in code, or populate an invisible field in your form on the variable, and refer to it as your parameter in your recordsource.

Posting Permissions

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