Trouble Displaying Column from Combo Box

D

Dkline

I have a control ProviderID which is a Combobox on the subform "frmAPS_Sub".
Parent form is "frmInsAnn".

I have set the column properties for the combobox as:

Name:=ProviderID
Control Source:=ProviderID
Row Source Type:=Table/View/Stored Procedure
Row Source:=tblProviders
Bound Column:=1
Column Count:= 6
Column Heads:= Yes
Column Widths:= 0";1.5";1";1";1";1"

The form needs to show the values of the other columns as well. So I've been
trying to use this syntax:
Me!ProviderID.Column(2)

All I keep getting is #Name!. I've tried including a reference to the parent
form plus other variations on a theme.

The only way I've been able to get the result I want is to create another
combobox for each column in the source to display and then set Enable:=No.
That is less than desireable. Is there a better solution.
 
K

Ken Snell [MVP]

ACCESS doesn't know whether you want to use the combo box or the field that
is named ProviderID; it's first going to use the Field, and that field
doesn't have a Column property.

Change the name of the combo box to cboProviderID. Then use
Me!cboProviderID.Column(2)
 
M

Mark

Your combobox is named the same as the field in the table. Access can't
figure out which one you're talking about when you type
Me!ProviderID.Column(2). Rename your combobox to something like cboProvider
and then you can insert "=cboProvider.Column(2)" (without quotes) as the
control source of your textbox.
 

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