Solved

Populate combobox row on splitform in access 2007

Posted on 2011-02-21
5
401 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
Comment Utility
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
Comment Utility
I meant the control bound to the field used for filtering.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
Comment Utility
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
Comment Utility
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
Comment Utility
Figured it out as stated.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

762 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now