"Mark Y" <mycy77@yahoo.com> wrote in message
news:04bd01c3464a$02bc87a0$a101280a@phx.gbl...
> Hello, I would like a list or combo box to be
> automatically filled by data following the selection I
> make in a combo box. The combo box is selecting available
> books from a query of books not checked-out. I want the
> box filled with the bookId and the next box to be
> automatically updated with the title of the book. any
> suggestions?
First, I'd suggest not displaying the BookId if you don't need to. Just have
one combo box with two columns, BookId and BookTitle, then set the width of
the first column to 0. Then your BookTitle will appear in the combo box, but
the value of the combo box will be the BookId (assuming you have BoundColumn
= 1).

If you must have a separate field for the book title, then it sounds like
you need a text box for this, not a combo or list box. Set the control
source of the text box to be the column of your BookId, BookTitle combo box
that contains the title. I.e.: =MyComboBox.Column(1). Then from the
AfterUpdate event procedure of your combo box put the code Me.Requery. Also
put this code in the form OnCurrent event procedure.

Hope this helps,


--
Peter De Baets
Peter's Software - MS Access Tools for Developers
[url]http://www.peterssoftware.com[/url]