List Box that updates 2 fields in a table

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

Guest

Is there a way to have a list box update 2 fields in a table

For example the drop down shows <document name> and <documentwebaddress>. I
want it to populate fields <doc1> and <doc1name>. I have doc1 - doc8
 
spooono said:
Is there a way to have a list box update 2 fields in a table

For example the drop down shows <document name> and <documentwebaddress>.
I
want it to populate fields <doc1> and <doc1name>. I have doc1 - doc8

Does doc1 get the web address and doc1name get the document name? If so,
in the AfterUpdate event for the drop down box you can add code to do this:

Me![doc1] = Me![mydropdownboxname].Column(1) ' The second column
(documentwebaddress) in the drop down box
Me![doc1name]=Me![mydropdownboxname].Column(0) ' The first column (document
name )in the drop down box

Of course you'd replace "mydropdownboxname" with the name of your drop down
box control.

Tom Lake
 
Thanks for your help Tom!!

Tom Lake said:
spooono said:
Is there a way to have a list box update 2 fields in a table

For example the drop down shows <document name> and <documentwebaddress>.
I
want it to populate fields <doc1> and <doc1name>. I have doc1 - doc8

Does doc1 get the web address and doc1name get the document name? If so,
in the AfterUpdate event for the drop down box you can add code to do this:

Me![doc1] = Me![mydropdownboxname].Column(1) ' The second column
(documentwebaddress) in the drop down box
Me![doc1name]=Me![mydropdownboxname].Column(0) ' The first column (document
name )in the drop down box

Of course you'd replace "mydropdownboxname" with the name of your drop down
box control.

Tom Lake
 
Back
Top