Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2003
    Posts
    10

    Unanswered: LinkCriteria to a subform

    I have a search list box which displays the results of a query. Now the way my database works is two main tables working on a one to many relationship. There is a customer table and then what thier purchase is in another table and its linked by a customer number. When you click the name with purchase on the list box I want it to pull up the form and with that name and thier purchase.

    The form has all the customer information, and on the subform has the purchase info. Here is the problem. I can get it to pull up the customer fine by "CustNum". But then you have to manually find the order by cycling on the subform. I want it to pull up the customer and go directly to the order coressponding to the list box.

    Can you link it to the subform called "Child41" on "CustomerForm"? This subfrom gets it's information from a table called "Deal" if that makes a difference. The subfrom order number is call "ID"

    Here is what I have now:

    Private Sub List7_DblClick(Cancel As Integer)

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "CustomerForm"

    stLinkCriteria = "[ID]=" & Me![List7]
    DoCmd.OpenForm stDocName, , , stLinkCriteria

    Dim stSearch As String
    stSearch = "NameSearchForm"
    DoCmd.Close acForm, stSearch
    End Sub

  2. #2
    Join Date
    Sep 2003
    Posts
    10
    I tried to discribe this best I can, if you need additional info just let me know. I appritiate any help!

  3. #3
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    465
    Originally posted by Cruising270
    I tried to discribe this best I can, if you need additional info just let me know. I appritiate any help!
    Can you post an sample base in Access 97 format, then i see what do...
    Saludos
    Norberto

Posting Permissions

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