Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2016
    Posts
    1

    Unanswered: get column value from Combo Box to update unbound text box value

    I have a combo box with 3 columns in a continuous form. When updated, I need to capture the value of the primary key in an unbound text box for use elsewhere. This value will change at every update of the combo box. How can I code this on an AfterUpdate event?

    cboSubSKill fields are txtSubSkill, intSubSkillID, intSkillID

    I need to capture the primary key value of the primary key (intSubSkillID) in an unbound text box "vcheck"

    thanks -David
    Last edited by dad1011; 09-09-16 at 04:30. Reason: title change for clarity

  2. #2
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    IF I understand your question correctly, and if the order that the Columns appear, in the Combobox, is

    txtSubSkill, intSubSkillID, intSkillID

    as posted, this should do it:

    Code:
    Private Sub cboSubSKill_AfterUpdate()
     Me.vCheck = Me.cboSubSKill.Column(1)
    End Sub

    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
  •