Solved

Populate combobox row on splitform in access 2007

Posted on 2011-02-21
5
446 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

726 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