Page 2 of 2 FirstFirst 12
Results 16 to 23 of 23
  1. #16
    ssanfu is offline Master of Nothing
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664

    You changed the Association text box control (FilterAssociation) to a combo box (cboFilterAssociation)?

    What is the Row Source for the combo box?

  2. #17
    d9pierce1 is offline Expert
    Windows 10 Access 2016
    Join Date
    Jan 2012
    Location
    Oklahoma
    Posts
    828
    Hi ssanfu,

    RowSource of cbo
    SELECT HelperID, HelperValue FROM tblHelper WHERE HelperTypeID=18 ORDER BY HelperValue;

    Sorry for delay, I got called to do a work aarend!
    IN any event, I was testing this for a different form and it will have cbo's in them.
    I did re attach a new copy of this db in last post #13...

    ps...I really didnt beleive it would be this complicated to change but again, i was wrong....
    Last edited by d9pierce1; 12-11-2021 at 09:52 PM.

  3. #18
    d9pierce1 is offline Expert
    Windows 10 Access 2016
    Join Date
    Jan 2012
    Location
    Oklahoma
    Posts
    828
    TempTestNew.zip

    Hi ssanfu,
    I attached this db again with a combo in it. Is there anyway to get this to work with a combo?
    I am not familiar with search stuff and have only used Allen Browns method in past. However
    with that said, i love your method and the filter as you type is just fantastic. I have 7 forms that
    will need filters and 3 out of the 7 will really need to have combo boxes rather then txt.

    I have searched google to the end and have found examples of this method with txt but nothing
    that shows me a combo example? I know i have tried every .Value, .Column, "", "'". '". and so on
    with no results that were sucessful in coding this in the function....

    I hate to bother you with this but i am at a loss here totally and would hate now to go back to
    Allens methods. Be like starting all over again.

    Thanks
    Dave

  4. #19
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    Why are you not debugging this and also using Debug.Print to see what is being produced?
    Why are you not using the same method as the other criteria?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  5. #20
    d9pierce1 is offline Expert
    Windows 10 Access 2016
    Join Date
    Jan 2012
    Location
    Oklahoma
    Posts
    828
    TempTest Newest.zip

    Hi all,
    I beleive I have done it. Not sure if absolutely correct method but it works now!
    Thanks to all.
    Dave

    ps...Will mark solved!

  6. #21
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    I would put the call for any combo in the AfterUpdate event as well.?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  7. #22
    d9pierce1 is offline Expert
    Windows 10 Access 2016
    Join Date
    Jan 2012
    Location
    Oklahoma
    Posts
    828
    Welshgasman
    Thanks, will do that!
    Dave

  8. #23
    ssanfu is offline Master of Nothing
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Dave,
    I added "_PK" and "_FK" suffixes to the PK and FK fields in the tables.
    In "tblPerson" you have a field named "PersonTypeID_FK". I would have named it "HelperID_FK" because it is the link to "tblHelper.HelperID_PK".

    BTW, RI cannot be enforced between "tblHelperType" and "tblHelper" because "tblHelper" is missing a record.
    "tblHelperType.HelperTypeID_FK" (the many side) has a record with the value of 1, but there is not a corresponding record in the 1 side table.
    Look at record 175 in ""tblHelper.HelperID_PK". The value in "tblHelper.HelperTypeID_FK" is 1.


    Click image for larger version. 

Name:	Relationship1.png 
Views:	9 
Size:	48.0 KB 
ID:	46881


    You set row source for the combo box "cboFilterAssociation" to limit the selections two options: Family or Friend.
    In "tblPerson", you are storing "tblHelper.HelperID_PK" in "tblPerson.PersonTypeID_FK.


    I would set the row source of "cboFilterAssociation" to
    Code:
    SELECT tblHelper.HelperID_PK, tblHelper.HelperValue FROM tblHelper ORDER BY tblHelper.HelperValue;

    There were many changes that had to be made: the union query, the listbox record source, column count, column widths.
    Then several places in the code. It took a while, but it is finally working (I think)......... (Try and not break it)
    Attached Files Attached Files
    Last edited by ssanfu; 12-13-2021 at 01:22 AM. Reason: fixed some things and added zip

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Sort/Fitler listbox or Search Listbox
    By Behedwin in forum Access
    Replies: 5
    Last Post: 11-09-2017, 12:27 PM
  2. Replies: 3
    Last Post: 09-12-2016, 11:49 AM
  3. Replies: 1
    Last Post: 03-26-2015, 11:08 AM
  4. Search Form - Dialog box asks for search criteria
    By faythe1215 in forum Queries
    Replies: 3
    Last Post: 02-10-2015, 05:54 PM
  5. Replies: 3
    Last Post: 01-04-2015, 06:09 PM

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