How refer to column in listbox on another form?

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.
 
V

Van T. Dinh

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)
 
H

hlt

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)
 
V

Van T. Dinh

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.
 

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

Top