• New records in filtered group (97/2000)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » New records in filtered group (97/2000)

    Author
    Topic
    #376148

    This is a basic problem I have had before and solved by myself – but today it has me completely stumped no matter how much I pore over forms I have done it on before!
    Here is the problem:
    I have a form. The data source for the form is a query which includes three joined tables: T_People, T_ContactDetails, and T_ContactTypes.
    The form header contains a combobox which has a list of names. When a name is selected, the records are filtered for contacts with that person.
    When I then add a new contact, I want it to be linked to that person – in other words, I want the field[[T_ContactDetails]. [PeopleID] to equal Me![FindPerson].
    The fields are both comboboxes – and each contains two columns – one invisible column whichcontains the PeopleID (the field which links the two tables T_People and T_Contact Details), and onecolumn that shows and contains the people’s names.
    What simple detail am I missing here? Thanks for any tips.
    -cynthia

    Viewing 1 reply thread
    Author
    Replies
    • #614948

      Tell me, what is the relationship between T_People and T_ContactDetails, is it a one (T_People) to many (T_ContactDetails)?

      What is the relationship of T_ContactTypes to the other two tables?

      It seems to me you should have a Main form (based upon T_People) and a subform(s) for T_ContactDetails and T_ContactTypes.
      HTH
      Pat cheers

      • #614979

        T_people is one-to-many with T_ContactDetails, and T_ContactTypes is one-to-many with T_ContactDetails
        I have done this before without a subform (I have a form where you use a combobox to choose a program, and then it filters for all the people who have participated in that program – that is a completely separate database for an unrelated project) and its been working fine for many months.
        I use subforms a lot, but didn’t want to use them on this form. Maybe I don’t know enough of the flexibility of subforms, but I was trying to avoid them becuase I don’t know how to get the space they occupy on the main form to grow and shrink for more or less records, and also I want some buttons and subforms seem to work better in a datasheet format, and that does not allow for buttons)

    • #614970

      Make the default value of the combobox on the form equal to a reference to the combobox in the header. I’m assuming the combobox in the header is not bound to the a field in the underlying table, right? A new record then should automatically pick up the value in the header combobox.

      • #614980

        Well! I am quite sure that I tried that earlier today – but I must have done something wrong in the reference. After reading your note, I decided to try it again before just replying that I tried it and it didn’t work – but VOILA! It seems to work just fine now. Thanks so much. If it still works in the morning when I add more records, I’ll be golden!
        (I’m still baffled about how I got that other form to work – there is NOTHING in the default value property on that one. It’s a mystery. But I made that one almost two years ago).

        Thanks again,
        -cynthia

    Viewing 1 reply thread
    Reply To: New records in filtered group (97/2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: