Solved

Populate combobox row on splitform in access 2007

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
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…
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…
Familiarize people with the process of utilizing SQL Server functions 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 Ac…

808 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