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

Populate combo box field on button click based on list box

P: 4
Hey everybody,

I have a database with one major form that has a few subforms and a listbox, and on the form there are buttons that link to other forms as well. Once the list box is clicked on, the four subforms automatically populate based on the selection. The buttons that link to the other forms are designed to begin to add a record (based on what subform button was pressed).

I want to find a way for the first field in the newly opened form (after a button click) to populate based on my list box selection. I'm totally 'cluless' about how to do this and would erally appreciate it if somebody could help me. Thanks!
Jul 28 '09 #1
Share this Question
Share on Google+
1 Reply


Expert 100+
P: 1,287
Two options for this. In the Form_Open, you can save the value in an invisible box by
1) reference the list box with Forms![MainFormName]![ListBoxName]
2) Use the OpenArgs of the DoCmd.OpenForm, then in the new form's Form_Open(), use the predefined OpenArgs. Basically, pass the value to the newly opened form.
Then, in On_Current(), set the field equal to the value saved in the text box.
Jul 28 '09 #2

Post your reply

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