how to transfer items in several controls to a list box with a com

G

gbpg

how would I tranfer textboxes, comboboxes, and listboxes on a form to a
listbox that would keep all the info - which would go to report after?
 
A

Alex Dybenko

Hi,
do not completely understand what you need, but here how you can loop
through all textboxes and list/combo boxes


dim ctl as control

For Each ctl In me.Controls
Select Case ctl.ControlType
Case acTextBox
'add from textbox
case acListBox, acComboBox
'add from listbox/combo
End Select
Next ctl


--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
 
A

Alex Dybenko

Hi,
well, can see where this code moves items, it just changes the flag. I think
you need to adjust listboxes rowsources, so in left one it will show all
records, and in right one - selected only, then it will look like copying

--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
 
G

gbpg

Now that my internet is back...that is why I am asking. I do not know how to
do make the right copy only. Any suggestions?
 

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