Results 1 to 9 of 9
  1. #1
    Join Date
    Jan 2004
    Location
    Houston, TX
    Posts
    29

    Red face Unanswered: Populating a Text Box - Continuous Form

    Ok, I have a combo box that when selected displays column 2 of the selected row in an adjacent text box. (This cbox is on a continuous form) My problem arises from the fact that when I select a new valus from the cbox on the next row, the text box value from the first and second rows is changed to reflect the new selection.

    Is there any way to lockin the value for the text box on each row as a new record is added.

    My code is below for the combo box:


    Private Sub cboDeptPersonID_AfterUpdate()

    Me.txtDeptName = Me.cboDeptPersonID.Column(2, cboDeptPersonID.ListIndex)

    End Sub
    Attached Thumbnails Attached Thumbnails involved.jpg  

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Are both the combobox and textbox bound to fields?

  3. #3
    Join Date
    Jan 2004
    Location
    Houston, TX
    Posts
    29
    No, only the Combo Box.



    Originally posted by M Owen
    Are both the combobox and textbox bound to fields?

  4. #4
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Originally posted by MrResearch
    No, only the Combo Box.
    That's why ... In order for the text box to retain unique values it needs to be bound to a table and field ... Otherwise with it being unbound, any assignment to it reflects on the entire column.

  5. #5
    Join Date
    Jan 2004
    Location
    Houston, TX
    Posts
    29
    Do you have any suggestion on how I can accomplish this task?



    Originally posted by M Owen
    That's why ... In order for the text box to retain unique values it needs to be bound to a table and field ... Otherwise with it being unbound, any assignment to it reflects on the entire column.

  6. #6
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Originally posted by MrResearch
    Do you have any suggestion on how I can accomplish this task?
    Nope. Question: You say:
    adjacent text box
    Is this textbox also on the continuous form? If so, then you're only hope is to bind the textbox ... It's just the nature of the beast ...

  7. #7
    Join Date
    Jan 2004
    Location
    Houston, TX
    Posts
    29
    Is there any way to display More than 1 column in the combo box once the appropriate record has been selected?

    Originally posted by M Owen
    Nope. Question: You say: Is this textbox also on the continuous form? If so, then you're only hope is to bind the textbox ... It's just the nature of the beast ...

  8. #8
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Originally posted by MrResearch
    Is there any way to display More than 1 column in the combo box once the appropriate record has been selected?
    There is another posting on this exact question ... Nope. You're only hope is to have both (or however many) items share 1 column ...

  9. #9
    Join Date
    Nov 2003
    Location
    Europe
    Posts
    369
    Originally posted by M Owen
    There is another posting on this exact question ... Nope. You're only hope is to have both (or however many) items share 1 column ...
    Out of curiosity:
    Would it be possible to create and populate a recordset, increment it accordingly and bind each record in the form to an "artificial" record in the recordset?

    But then, if that would work, values would be lost at least when closing the db?, which is not desireable. But for a temporary or display/print-once-only solution or the like it could be done if it was not a problem that the values would be lost when closing it?

Posting Permissions

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