List Box Won't update Text field

  • Thread starter Thread starter Imdabaum
  • Start date Start date
I

Imdabaum

Layout: I have a form and a subform that allows the user to make notes
about the product (projected completion date, set-backs, requests, etc)
.. Delete, Add, Edit, and Cancel buttons. These buttons are straight
forward and work.
Still in the subform, I have a listbox that shows the date the note was
written and the first 8 letters of the Note and has a source of a query
against a tblUpdates, which pulls the [productID],[Date Note was
wriiten], [Rep], [part of note], and [the note].

The listbox updates properly and shows the memos that are added, but
when I select a note from those existing in the listbox, The txtField
does not change.This causes problems for the Edit button.

So how do I connect the txtField to the selected item of the listbox?
 
In the listbox's AfterUpdate event, you could try something like:

Me.YourTextControl = Me.YourListBox.Column(n)

where the (n) is the zero-based column number in which the text information
appears.

This code sets the value of your text control to the value of the nth column
(again, zero-based -- start count column numbers as 0,1,2,...). This
assumes your text control is unbound.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top