Group:  Microsoft Access ยป microsoft.public.access.forms
Thread: calculated field in a form

calculated field in a form
Penny 12/31/2008 3:36:01 PM
I am trying to calculate a field in a form. I have a table that has the fields

Product _ID
Product Name
Product Price

I have an unbound combo box which selects a produce name. I am then
creating a calculated field in my form which calculates the area multipiled
by the price of the carpet. My calculation =[Combo22]*[Area of Carpet
required] works but from [combo22] picks up the product_id and not the
product price. How can I tell my caluclation to pick up the 3rd field rather
than the 1st one?
Re: calculated field in a form
"Ken Snell \(MVP\)" <kthsneisllis9[ at ]ncoomcastt.renaetl> 12/31/2008 4:00:42 PM
=[Combo22].Column(2)*[Area of Carpet required]

The Column property of a combo box (or list box) allows you to read/use a
value from a column other than the bound column. It's a zero-based property,
so Column(0) is the first column, Column(1) is the second column, etc.
--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/


"Penny" <Penny[ at ]discussions.microsoft.com> wrote in message
news:82F9BDE4-19AD-4657-9CF9-8864F347E49E[ at ]microsoft.com...
[Quoted Text]
>I am trying to calculate a field in a form. I have a table that has the
>fields
>
> Product _ID
> Product Name
> Product Price
>
> I have an unbound combo box which selects a produce name. I am then
> creating a calculated field in my form which calculates the area
> multipiled
> by the price of the carpet. My calculation =[Combo22]*[Area of Carpet
> required] works but from [combo22] picks up the product_id and not the
> product price. How can I tell my caluclation to pick up the 3rd field
> rather
> than the 1st one?


Home | Search | Terms | Imprint
Newsgroups Reader