Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2004
    Posts
    44

    Unanswered: Comb Box Linkage Issue

    Hi there. I'm relatively new to access and am so far stubmling my way through. I have the following setup and associated issue which I am looking to resolve and was hoping I might find some help here.

    I have 3 tables, and I'm trying to set it up so each table corresponds to a form. (Then I'm thinking about putting all 3 forms within a sub-form, but that's jumping ahead). What I'm most concerned about is setting up a combo box for a particular field in the table be picked, and then having the rest of the text box fields filled in so that they correspond to the item picked from the combo box.

    I recived a little bit of help on this earlier from another source, but either a) they were wrong, or b) i messed something up since I only got it to partially work.

    I'll use the following example of children and their allowances to set things up...

    Child | ChildID
    Week1 | Week2 |.....Week7
    TextBox | TextBox | TextBox

    I have manged to get to the point where if I pick "Suzzy", her ID of "2011" will come up next to her. (Also, if I matters I am running the ComboBox off of a query of the originating table.) To accomplish this I have =ComboBoxName.Column(1) as the ControlSource for ChildID

    Likewise, I have =ComboBoxName.Column(2)-(8) respectively set for the ControlSource for Weeks 1-7. However, when I go back to Form View those field are blank and stay blank when I change Child from the dropdown list, yet the ChildID will change?

    If any of this is confusing or you need more information please let me know as I'd really like to figure out what I'm missing.

  2. #2
    Join Date
    Jan 2004
    Posts
    44
    Noboyd??

  3. #3
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713

    Re: Comb Box Linkage Issue

    Originally posted by Superman07
    Hi there. I'm relatively new to access and am so far stubmling my way through. I have the following setup and associated issue which I am looking to resolve and was hoping I might find some help here.

    I have 3 tables, and I'm trying to set it up so each table corresponds to a form. (Then I'm thinking about putting all 3 forms within a sub-form, but that's jumping ahead). What I'm most concerned about is setting up a combo box for a particular field in the table be picked, and then having the rest of the text box fields filled in so that they correspond to the item picked from the combo box.

    I recived a little bit of help on this earlier from another source, but either a) they were wrong, or b) i messed something up since I only got it to partially work.

    I'll use the following example of children and their allowances to set things up...

    Child | ChildID
    Week1 | Week2 |.....Week7
    TextBox | TextBox | TextBox

    I have manged to get to the point where if I pick "Suzzy", her ID of "2011" will come up next to her. (Also, if I matters I am running the ComboBox off of a query of the originating table.) To accomplish this I have =ComboBoxName.Column(1) as the ControlSource for ChildID

    Likewise, I have =ComboBoxName.Column(2)-(8) respectively set for the ControlSource for Weeks 1-7. However, when I go back to Form View those field are blank and stay blank when I change Child from the dropdown list, yet the ChildID will change?

    If any of this is confusing or you need more information please let me know as I'd really like to figure out what I'm missing.
    You need to requery the controls after the combobox update ...

  4. #4
    Join Date
    Jan 2004
    Posts
    44
    Forgive me for sounding stupid, but as I said before, I'm new to access. What do you mean by "controls", and by requery do I need to put something into the "Afterupdate" field on each of the years/text boxes?

    Even if this is the case I don't understand how the one field is updating when I make a selection, and yet all the others are not?

    Thanks!

  5. #5
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Originally posted by Superman07
    Forgive me for sounding stupid, but as I said before, I'm new to access. What do you mean by "controls", and by requery do I need to put something into the "Afterupdate" field on each of the years/text boxes?

    Even if this is the case I don't understand how the one field is updating when I make a selection, and yet all the others are not?

    Thanks!
    A control is any user interface element (textbox, combobox, listbox, etc ...)

    ReQuery is a method of a control to refresh the contents of said control. It can be accessed thru many means ... Try searching thru your help documentation for more info ... "MS Help is your friend."

    BTW, Me.ControlNameHere.Requery is one way ...

  6. #6
    Join Date
    Jan 2004
    Posts
    44
    Thanks for the help. I may end up going with Me.ControlName.Requery, but I definitely will look around MS help.

    I'm trying to learn, not just figure out a work-around!

  7. #7
    Join Date
    Jan 2004
    Posts
    44
    Okay, I think I figured it out. I feel kinda stupid. I had my Column Count set incorrectly. I thought it was associated with only the columns I wanted displayed in the combo box, not both visable and invisable!

  8. #8
    Join Date
    Jan 2004
    Posts
    44
    Okay, so I didn't entirely figure it out. I had the Column Count set too low, so that's why I was not showing up in the other "controls" once I made a selection from the combo box. However, now that I have changed the column count to the correct number - 11 - I am forced to see the entire query when I drop down my combo box and have the option of scrolling over within the combo box.
    I tried to fix this by going into the query and unchecking the "show" checkbox on all of the columns within the query that I did not want to see, but I get nearly the same result - a combo box that I can scroll over in, but now blank spaces are showing and when I make a selection my controls are not popluated - or they are an I simply cannot see them.

    How do I fix this seemingly minor problem?

    Thanks in advanace.

Posting Permissions

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