Results 1 to 3 of 3
  1. #1
    merrikaylee is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2016
    Posts
    5

    Filter combobox from data in another combobox IN SUBFORM

    Hi,



    I have three field that need to be entered into a line in a subform.

    The main form is named [Form-Project/Account Master].
    The subform is named [Subform-Financial Transactions]

    The three fields are related as follows:

    Field 1 is named [Transaction_Donor] and uses a combo box of the master file of donors
    [List of Funding Source]. One record per donor.
    Field 2 is named [Transaction_Proposal] and uses a combo box of Proposals [Data of Funding Proposals]. One donor to many proposals (grants).
    Field 3 is named [Transaction_Description] and uses a combo box of the allocations for the proposal [Data of Funding Allocations]. One proposal to many allocations.

    1. I want the user to be able to first select a donor from a combo box.
    2. Then the user would select a grant from a combo box that is filtered on the Donor they selected.
    3. Then the user would select a line item from a combo box that is filtered on the Grant they selected.

    I set up the first combo box with a field name of cboDonor and it works fine.
    It is in the second Combo box that I have trouble. I define 3 fields: [Grant ID], [Grant Description], and [Donor Description]. For the criteria for the [Donor Description] I have tried:
    > [Forms]![Form-Project/Account Master]![Subform-Financial Transactions]![cboDonor]
    > [Forms]![Subform-Financial Transactions]![cboDonor]
    > and a bunch of other things.

    But it always gives me an error "Enter Parameter Value" for whatever I have in the criteria. When I enter the value that I entered in the previous combo box, it displays the correctly filtered list, so I think the problem has to in the coding of the criteria. I'm wondering if there is something special about the subform.

    I have put the requery after update in the first combobox.

    Sorry for the really long question. I'm hoping it's really a short answer...something stupid I'm just missing.

    Merrikay

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,898
    Try Row Source SQL statement of:

    SELECT [Grant ID], [Grant Description] FROM Grants WHERE Donor = [cboDonor];

    Comboboxes are all located on same form - full path reference is not necessary.

    Strongly advise not to use spaces nor punctuation/special characters in naming convention.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    merrikaylee is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2016
    Posts
    5

    Thanks

    Thanks so much...the answer was indeed short and simple. Don't know how I got so far astray!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 7
    Last Post: 11-11-2014, 06:10 PM
  2. Replies: 1
    Last Post: 09-06-2011, 01:47 PM
  3. Replies: 29
    Last Post: 08-16-2011, 05:52 PM
  4. Replies: 0
    Last Post: 08-24-2010, 06:38 PM
  5. Replies: 0
    Last Post: 12-16-2009, 01:14 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums