Results 1 to 8 of 8
  1. #1
    Join Date
    Jun 2012
    Posts
    85

    Unanswered: Parent/Child Relationships

    Hey,
    I have created a for with 5 subforms which contain navigation buttons. I.e tabbed across the top. I am want to create a combo box search at the top of the form (in the header). I have a list of 56 names attached to the combo box. Once i select a name i want it to search in all the 5 subforms. so i just have to click the navigation buttons at the top to go through the different subforms. does anyone know how to do that?
    I have tried to attach a file of it in access but i wont allow access files. If there is a way to attach access files please let me know also, as i see an example the best way to have an idea of what the person is after. thanks!

    Mike
    ___________

  2. #2
    Join Date
    Aug 2004
    Location
    Cary, NC
    Posts
    264
    Just define the subform query to use the value in the search combo and...

    if the query behind the subform is simple and runs quickly set each tab to requery when it receives focus.

    or requery all 5 forms when the combo box value changes.

    Steve

  3. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    to do that you'd need to put some code behind the combo box event(s)
    you would need to investigate which event is the right one (it depends on what you are usign to impur, when you know the input has finsihed., I'd be temtped to start witht he on click event and the on change events

    I'd set the filter for the 5 sub forms
    if you are looking for a sepcific name then use either = "myname" or = mycombobox.value

    eg

    'for a user whio has entered something int he combo box.
    on change woiudl be best


    subform1.filter = "name like '" & mycomboxo & "*'"
    subform1.filteron=true
    subform2.filter = "name like '" & mycomboxo & "*'"
    subform2.filteron=true
    ...
    subform5.filter = "name like '" & mycomboxo & "*'"
    subform5.filteron=true


    for a on click event


    subform1.filter = = "name = '" & mycomboxo & "'"
    subform1.filteron=true
    subform2.filter = "name = '" & mycomboxo & "'"
    subform2.filteron=true
    ...
    subform5.filter = "name = '" & mycomboxo & "'"
    subform5.filteron=true


    not to sure about the correctg code it may not be filteron, but if you look intg he help system or do a google on MS Access filter you should find out whats needed.
    bear in mind if you set a filter on, then you may want to have a button which removes the filter
    I'd rather be riding on the Tiger 800 or the Norton

  4. #4
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Quote Originally Posted by Mike02 View Post

    ...I have tried to attach a file of it in access but i wont allow access files. If there is a way to attach access files...
    ZIP your Access file up and then attach the ZIP file.

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  5. #5
    Join Date
    Jun 2012
    Posts
    85
    I have tried linking through form Queries, I have this expression to navigate through the forms. In the criteria section: Like [Forms]![Fund Navigation Form].[MyFundName] & "*" now that works . but When i select the name in the combobox nothing happens... any ideas?
    Last edited by Mike02; 06-29-12 at 12:51.
    Mike
    ________

  6. #6
    Join Date
    Jun 2012
    Posts
    85
    To continue on the statement before, i can get the combo box on the navigation form to select a value. this is my issue i think. I think as soon as i am able to select a value i will be good to go, any ideas, thanks apprecited!
    Mike
    ________

  7. #7
    Join Date
    Jun 2012
    Posts
    85
    Solved it, i wasnt telling access the for was a subform...


    When telling access to look through a form you must put .[Form] after it to show subform
    Mike
    ________

  8. #8
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    The ESP gene isn't found in the Access Gnomes' genome!

    You do pretty much have to guide them by the hand!

    Glad you got it working!

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Posting Permissions

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