Solved

Populate combobox row on splitform in access 2007

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server stored procedures 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 Micr…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

809 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