Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2002
    Posts
    23

    Post Unanswered: Opening query as a form

    Hi All,

    I have a form with a combo box and a command button. The button runs a macro that runs a query. The query is run based on the result of the combo box. I want the results of the query to show up in a form, not a data sheet. How would I do that?

    Thanks,
    Johnny

  2. #2
    Join Date
    Aug 2002
    Location
    Charlotte NC
    Posts
    665

    Re: Opening query as a form

    Originally posted by MountJohnny
    Hi All,

    I have a form with a combo box and a command button. The button runs a macro that runs a query. The query is run based on the result of the combo box. I want the results of the query to show up in a form, not a data sheet. How would I do that?

    Thanks,
    Johnny
    make a subform and put it in the form, or if you want it to pop up just make another form with the query as its data source. you can change the data source of a form in code. rowsourcetype = "table/query"
    rowsource = "query_Name"
    you can use an if then statment to evaluate the combo and then apply the correct querys.

    Then at the end of the comand button put in a docmd.requery step for the subform or just a docomd.openform comand if you just want it to pop up.
    Jim

Posting Permissions

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