Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2006
    Posts
    40

    Unanswered: Listbox values nt shown in textbox - AfterUpdate even

    Private Sub ListBox1_AfterUpdate event()

    Dim rs as Object

    Set rs = RecordSet.Clone
    rs.FindFirst "[Serialno] = " & Str(Nz(Me![ListBox1]))
    if not rs.EOF then Me.Bookmark = rs.Bookmark
    Me.Text1.Value = ListBox1.Column(0) (suspect this line is the main error)

    Elaboration
    Serial no = pk
    Listbox1 = populated list
    I am using MS Acess and visual basic, what i want to achieve is to display the selected value from the listbox and put in the textbox. But dnt get it why i always get this annoying error! Very much appreciated if u guys can assist me in pointing or highlighting out the error. Tks for any kind advice and assistance in advance.

    Error: CancelUpdate or Update without AddNew or Edit.
    Tks.

  2. #2
    Join Date
    May 2005
    Posts
    1,191
    Just taking a quick look, you don't need .value in the
    Me.Text1.Value = ListBox1.Column(0) (suspect this line is the main error)
    Just Me.Text1

    Try that for starters.
    Me.Geek = True

  3. #3
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    n/ m
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

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