Combo box looks up name and ID, displays name but stores ID.

G

Guest

From what I have read this should be easy but I can't get it to work.
I can get the names{text} to display or else I get a pop up screen prompting
me for the ID but I can't get it to work as I want.

I have 2 tables: Risk_List and Risks.
Risk_List has name {text} and ref {key}
Risks have name {interger} which is linked to Risk_list.ref
{I probably shouldn't have used 'name' but never mind.}

I have a Form: Enter_Risks
I have a combo box in the Form which I want to display Risk_List.name but I
want to store Risk_List.ref into Risk_List.name.

I have source control set to Risks.name.
I have row source set to SELECT risk_list.name, risk_list.ref FROM risk_list;
I have tried bound column set to 0 and 1 and 2 but the Form just prompts me
for the ref regardless of this value.
Column Court - set at 2
Column widths set at 8.865cm;0cm

I just keeps prompting me "Enter parameter value risk_list.ref"
Is there something wrong with my SELECT statement?

If I use SELECT risk_list.name FROM risk_list;
At least it displays OK.

This has GOT to be something simple but I can't figure it out.
 
R

ruralguy via AccessMonster.com

Have you tried letting the wizard create a new ComboBox for you?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top