[AccessD] Bound combo is setting the value in the underlying record source's foreign key field to 0

Charlotte Foust charlotte.foust at gmail.com
Sun Jan 11 14:24:18 CST 2015


Columns are tricky because in position terms you use a zero-based index but
in the property binding the column, you use a 1-based index, so if you want
Column(0), you bind the first column in the property sheet by setting the
bound column property to 1.

Charlotte

On Sun, Jan 11, 2015 at 12:19 PM, Bill Benson <bensonforums at gmail.com>
wrote:

> I have a form where a combo is has bound column = 0, controlsource is my
> field FKRetailerID in the table on which the form is based. The rowsource
> is
>
> SELECT CompanyID, company FROM Company WHERE FKCompanyTypeID = 2 and
> nz([deleted],"")="";
>
> That is to give me a list of all companies of the required type (retailer)
> which are not shown as deleted in the company table.
>
> The filter for the form happens to be FKRetailerID = 2 but this is not
> making a difference whether FilterOn is true or false.
>
> The disruptive behavior is that whenever I position the combo on a value,
> it
> shows a valid company name (Column 1 is ComnanyName) . But it is setting
> the
> bound column's value to 0 in the data table.
>
> Testing ?screen.activeform.controls("CBORetailer").Column(0) in the
> immediate window, I can see the combo's 1st column has a value of 2.
> Testing?screen.activeform.controls("CBORetailer").Controlsource I can see
> FKRetailerID is the bound field.
>
> However the underlying table is getting set to 0.
>
> This is maddening.
>
> Help?!
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>


More information about the AccessD mailing list