Results 1 to 6 of 6
  1. #1
    4 Star Lounger
    Join Date
    Aug 2003
    Location
    Stroud, United Kingdom
    Posts
    548
    Thanks
    0
    Thanked 0 Times in 0 Posts

    combobox All records (97)

    I have a combobox on a form which displays 12 deparments, and a subform linked to display many records linked to each of these 12 departments. as i select the departments 1 to 12 the subform faithfully shows me all records linked to each department.

    Question is, whats the easiest way of showing ALL records for all 12 departments in the subform, and having an extra '"all Records" label displayed in the combobox?

    i want to do this because when i run queries i want to be able to use the combobox to give a departmental or total record view.
    Thanks,

    pmatz

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: combobox All records (97)

    How is the subform linked to the combo box? The standard way (setting Link Child Fields and Link Master Fields) won't allow you to do what you want, but there are alternatives. It would be useful to know how it works at the moment. Thanks.

  3. #3
    4 Star Lounger
    Join Date
    Aug 2003
    Location
    Stroud, United Kingdom
    Posts
    548
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: combobox All records (97)

    Cool, well here goes.

    I have 12 departments, each with an ID. This ID is the link to all the records in another table, Docs.
    The subform currently is linked through the parent child method as you said, so that all records for each department are displayed.
    The combobx is linked to the Deps table, so changing this changes all records in the subform.

    I have the following code which gives me a query for the subform data:

    Forms![frm_updateall]![sbfrm_Protocols].Form.RecordSource = "qry_All"

    which works fine, only the records fom the qeury are present, and the combobox still cycles through departments for these queried records... if that makes sense.

    i wonder i fi can change the record source for the parent from, so that it is ALL departments. but dont think i can.

    if it helps i can attach a skeleton of the DB?
    Thanks,

    pmatz

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: combobox All records (97)

    Attaching a skeleton database would help, yes.

    What is qry_All?

  5. #5
    4 Star Lounger
    Join Date
    Aug 2003
    Location
    Stroud, United Kingdom
    Posts
    548
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: combobox All records (97)

    qyr_all is a query that gets its parameters from another form... namely a form that enables the user to choose dates and author to query on.

    this then feeds the subform.

    i have found my database too big to attach, even if zipped..grrrr....

    i will try to strip it down and post later. sorry
    Thanks,

    pmatz

  6. #6
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: combobox All records (97)

    There is an example on my Web Site with three combo boxes. You should be able to adapt this... See item 6 "Multiple Combo Boxes to Select Records" Please note I HAV'NT converted 1 to 5 to Access 97 yet! So they won't work in 97

Posting Permissions

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