Results 1 to 11 of 11
  1. #1
    4 Star Lounger
    Join Date
    May 2003
    Location
    Manchester, Gtr Manchester, England
    Posts
    552
    Thanks
    0
    Thanked 0 Times in 0 Posts

    textbox display (2000)

    Hiya, have a syncronised combo where the values in each then populate two fields (a and ) on a many form. The values in A and B are numeric and the bound IF columns from the two respective combo boxes show in the A nd B fields when combos update. In terms of the data population I am happy, however I need the literal names as shown in the combo boxes to show in the text boxes. Is this possible or would the text boxes have to be changed to combos and if so how do I configure the combos to accept new entries?

    Thanks Darren.

    Thanks Darren

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: textbox display (2000)

    Do you populate A and B using code, or using expressions in the Control Source? What do the code or expressions look like?

  3. #3
    4 Star Lounger
    Join Date
    May 2003
    Location
    Manchester, Gtr Manchester, England
    Posts
    552
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: textbox display (2000)

    Hi Hans, A and B are populated with the update event from the combos: me.combo=forms.xxx.a

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: textbox display (2000)

    I thought you were populating text boxes from combo boxes? The code you posted populates a combo box from something else...

  5. #5
    4 Star Lounger
    Join Date
    May 2003
    Location
    Manchester, Gtr Manchester, England
    Posts
    552
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: textbox display (2000)

    Hello sorry for the delay, I have attached a copy. I need combo A to populate text A with the bound number but the display being the literal title. Can this be modelled.

    Regards Darren.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: textbox display (2000)

    Since A and B on the subform are bound to number fields, they cannot display text values. You'll have to change them to combo boxes with a hidden first column, just like A and B on the main form.

    The code as is will only change A or B in the current record in the subform. Is that what you intend?

  7. #7
    4 Star Lounger
    Join Date
    May 2003
    Location
    Manchester, Gtr Manchester, England
    Posts
    552
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: textbox display (2000)

    Yes, just the current record, thanks.

    Darren.

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: textbox display (2000)

    OK, so change A and B on the subform to combo boxes with two columns, the first one hidden. See attached version.

    Note: each of your tables had duplicate indexes, I removed those.

  9. #9
    4 Star Lounger
    Join Date
    May 2003
    Location
    Manchester, Gtr Manchester, England
    Posts
    552
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: textbox display (2000)

    Thanks Hans, splendid. It has occured to me should the user change combo A and forget to update combo B then the combos in the subform would have incompatiable details. How can I maintain the compatiblity by forcing a change B when approporiate?

    Thanks Darren.

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: textbox display (2000)

    You could clear combo box B on the subform when you set combo box A from the main form:

    Private Sub A_AfterUpdate()
    Me.B.Requery
    Me![detail subform]!A = Me.A
    Me![detail subform]!B = Null
    End Sub

  11. #11
    4 Star Lounger
    Join Date
    May 2003
    Location
    Manchester, Gtr Manchester, England
    Posts
    552
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: textbox display (2000)

    Thanks again Hans.

    Darren.

Posting Permissions

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