Value from listbox into field on another form

joslinmk

New member
Local time
Today, 15:15
Joined
Apr 15, 2005
Messages
4
I have a listbox lst_IP_OPEN with a command button IP_SEND on a form fm_IP_STATUS Im am trying to get it so that when you select 1 item from the listbox and click the button it will update the field IP on another form fm_SYSTEM. I can get it to work updating a text field on the same form. But I can not get it to update a field on the other field. Both forms are open at the same time. The code I used to get it to work on the same form is

CODE:

Private Sub IP_SEND_Click()

Me.[test] = Me.[lst_IP_OPEN].Column(0)

Exit_IP_SEND_Click:
Exit Sub

I am sure this is simply a matter of changing the ME.[test] to the correct thing but I just can't seem to get it to work.

Thanks for the help
 
One way is to go through the Forms collection:
Forms!Form2Name!Control2Name = Me.[lst_IP_OPEN].Column(0)

...using your names for the Bold names!
 
Thank You

That worked great Thank You!
 

Users who are viewing this thread

Back
Top Bottom