Solved

Populate combobox row on splitform in access 2007

Posted on 2011-02-21
5
458 Views
Last Modified: 2012-06-21
I have a split form tied to a table. The form is used to edit the data in the table.
I would like to reference one of the fields with a combobox. The combobox rowsource needs to pull its description from another table such that:
the field's Control Source is the field from the table that is being edited,
but the Row Source shows the description from another table that ties to the data.
0
Comment
Question by:JP_TechGroup
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 31

Expert Comment

by:Helen Feddema
ID: 34946446
I am not entirely sure what you want here, but it seems that you want to filter the combo box's row source by a field.  This would be typical code for that purpose (make sure to requery the combo box from the Form_Current event and the AfterUpdate event of the form bound to the field used for filtering):

SELECT tblOrderDetails.* FROM tblOrderDetails WHERE (((tblOrderDetails.ProductID)=[Forms]![frmOrders]![cboProducts]));
0
 
LVL 31

Expert Comment

by:Helen Feddema
ID: 34946457
I meant the control bound to the field used for filtering.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 34963943
To be clearer, ...instead of using generic references terms like:
<I have a split form tied to a table. The form is used to edit the data in the table.
I would like to reference one of the fields with a combobox. The combobox rowsource needs to pull its description from another table such that:
the field's Control Source is the field from the table that is being edited,
but the Row Source shows the description from another table that ties to the data.>

Just use your *specific* situation, ...for example:
I have a split form tied to a CUSTOMER table. The form is used to edit the data in the CUSTOMER table.
I would like to reference the STATE field with a combobox. The combobox rowsource needs to pull its description from the STATE  table such that:
the field's Control Source is StateName from the STATE table,...

In other words, explain *exactly* what you have, ...then clearly state exactly what you want to happen.

Thanks

JeffCoachman
0
 

Accepted Solution

by:
JP_TechGroup earned 0 total points
ID: 34998126
Ok, the question was vague... the answer was to use a two column combobox, bind the control to the bahind the scenes data and display the user friendly list by placing the "user-friendly" portion first and only allowing the column width to display this column. I'm sure the answer is as vague as the question, but there it is.
0
 

Author Closing Comment

by:JP_TechGroup
ID: 35042511
Figured it out as stated.
0

Featured Post

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question