Consulting

Results 1 to 3 of 3

Thread: Passing 2 parameter values from forms to query

  1. #1
    VBAX Mentor
    Joined
    Sep 2007
    Posts
    405
    Location

    Exclamation Passing 2 parameter values from forms to query

    Hi All,

    Need an help ..!

    Designed a form named frmdate from where i need to select the date range to generate reports.

    Have two textbox txtstartdate and txtenddate and a calendar ctrl named cal1 an option button.

    i have selected option button, the calendar value will be displayed in the corresponding text box based on the option box selection.

    Now depending upon the date range in the two textbox i need to generate the report. The two text box values will be the parameter to the query.

    Query :
    select * from tblfeeds where DateofEntry Between [forms]![frmdate]![txtstartdate] and [forms]![frmdate]![txtenddate]

    If i run this query it works. But i run the query via forms its not working for me... am not sure how to assign the textbox values from forms to the query.

    Excepting help regarding this...
    Also attached sample database for the reference.

    -Sindhuja

  2. #2

    Oops...

    Evening There.

    The first two errors I notice is that your Table Name in your Query does not match your actual Table Name and your Form Name in your Query does not match your actual Form Name. Fix these errors and you'll be better off...

    But in regards to your actual question, check out this article on the Microsoft Office website. It should answer most of your Form Query questions.

    Happy Coding.
    Scott

  3. #3

    Oops...

    Evening There.

    The first two errors I notice is that your Table Name in your Query does not match your actual Table Name and your Form Name in your Query does not match your actual Form Name. Fix these errors and you'll be better off...

    But in regards to your actual question, check out this article on the Microsoft Office website. It should answer most of your Form Query questions.

    Happy Coding.
    Scott

Posting Permissions

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