By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,165 Members | 850 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,165 IT Pros & Developers. It's quick & easy.

How to Copy Form1 ListBox Value to Form2 TexBox

P: 1
Hi All,

I'm creating a Form ("Menu") that has 2 listboxs in it. My problem is that I can't copy the values of each listbox, into another Form's textboxs.

The idea is that users can select their options in the "Menu" form and then open the other form, and have those selected options copied in their respective textboxs.
I used this code from a post in this forum,
(Discussion: Copy data from one FORM to another FORM):

Me.UserName = Forms("LoginFormName").Controls("UserName")

But i have experienced a couple of problems, mainly that it sometimes picks data that isn't the one that should go to the textbox (In both cases the value that I need is the key of the listbox), for example dates instead of numbers.

Thanks, any help is welcomed.
Feb 9 '07 #1
Share this Question
Share on Google+
1 Reply


NeoPa
Expert Mod 15k+
P: 31,494
Do the users open the other form FROM this one or do they do it independently?
Which are the bound columns of the ListBoxes? Can they be changed to reflect the data you need?
(Referring to Items on a Sub-Form) should give you hints on referring to items on another form (as well as subforms obviously).
If you still have questions then come back, but try to post it more clearly with the relevant information included (names of forms; controls; columns in ListBoxes etc).
BTW if referring to another thread then the link is better to use than the title as finding a thread by title isn't too easy in a forum as busy as this.
Feb 11 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.