Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2004

    Cool Unanswered: Displaying information from multiple queries on a form

    I have a form that has a grid of text boxes on it. These text boxes are used to display counts that come from queries. These queries count the number of a particular type of entry for a particular date. The viewer can open this form and see a display of numbers that shows them how students are performing on different days.

    The form is unbounded. I just can't get the data from the queries to display in the text boxes on the form. Can anyone help?

  2. #2
    Join Date
    Dec 2002
    Préverenges, Switzerland
    this (DAO code!!!) works a treat:

    dim dabs as dao.database
    dim recs as dao.recordset
    dim rfld as dao.field
    set dabs = currentdb
    set recs = dabs.openrecordset("yourQueryNameGoesHere")
    For Each rfld In recs.Fields
    Me(rfld.Name) = rfld
    Next textbox name needs to be the same as the field name

    currently using SS 2008R2

  3. #3
    Join Date
    Jun 2004
    The DLookup worked for me too

    Private Sub Form_Current()

    Me.txtBx_name = DLookup("NewStudent2004", "qryNewStudent")

    End Sub

Posting Permissions

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