How refer to column in listbox on another form?

  • Thread starter Thread starter Ryan
  • Start date Start date
R

Ryan

I need to refer to a column in a listbox on another form.
The row was selected and a command button was pressed to
get to the form I am currently on.

They did not install the Help files in Access, so I hope
someone knows the answer.
 
Forms!OtherForm!ListBox.Column(x)

Where X in the index of the Column. Note that the index
is zero-based so x=0 refers to the 1st Col, x=1 refers to
the 2nd Col, etc...

Get "them" to install Help file. No use trying to develop
a database without Help file.

HTH
Van T. Dinh
MVP (Access)
 
Van,
Can the same be done for a combo box? And if so, do you put the code in the command button that opens the new form or do you put the code in the field in form 2?
Thanks
HLT

----- Van T. Dinh wrote: -----


Forms!OtherForm!ListBox.Column(x)

Where X in the index of the Column. Note that the index
is zero-based so x=0 refers to the 1st Col, x=1 refers to
the 2nd Col, etc...

Get "them" to install Help file. No use trying to develop
a database without Help file.

HTH
Van T. Dinh
MVP (Access)
 
See comments in-line.

HTH
Van T. Dinh
MVP (Access)


-----Original Message-----
Van,
Can the same be done for a combo box?
Yes.



And if so, do you put the code in the command button that
opens the new form or do you put the code in the field in
form 2?

No ideas what you meant since I don't know your set-up.
Just use the expression where you need this value.
 
Back
Top