List box Help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have two tabels what I would like to do is select the list box which has 3
field and copy the information to the form and store it in Table1. Can this
be done from 1 listbox

Thank you for your help

example (information stored in table1)
form fields
Location Name
Location Address
Location City

second table (Location)
LocationName
Address
LocationCity
 
Why store it twice? Just store the Primary Key value of the row from Table1.

You can use the AfterUpdate event of the Listbox to populate bound form
controls with the the corresponding values from the columns (aircode):

Sub Listbox_AfterUpdate()
Me.txtLocationName = Me.ListBox.Column(0)
Me.txtLocationAddress = Me.ListBox.Column(1)
Me.txtLocationCity = Me.ListBox.Column(2)
End Sub
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 

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

Back
Top