Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2002
    Posts
    3

    Unanswered: Passing Query Results to a subform

    I am looking to create a search form that allows users to enter criteria into unbound txt boxes and choose values from a list and then search by them when hitting a search button. The results of the query will populate a subform and then the user can dbl click the record and view the contents of that record in another form.

    I created two forms, one subform and the strSQL. How do I get the results of my query to populate the subform and then pass the selected record into a form for the user to view?

    I tried this
    Forms!frm_Result.RecordSource = strSQL
    Forms!frm_Result.Refresh

    But I get an error saying that the form either does not exist or it is not open.

    Appreciate any help offered.

    Scott

  2. #2
    Join Date
    Nov 2001
    Posts
    336
    Hi,

    If you code the main (parent) form then the syntax would be like that:

    Me.sfrmResult.Form.RecordSource = strSQL

    or

    Me.sfrmResult.RecordSource = strSQL


    Igor

Posting Permissions

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