2 x combo boxes

  • Thread starter Thread starter Nigel
  • Start date Start date
N

Nigel

I need to set up a basic ordering form. In it I have set up a table
containing 'products'.

My products are patch leads which vary in price according to type and
length.

With two combo boxes in a form, one to select a product type and a second to
select the length, can a third text box find the price using these
parameters?

I have already set up a query to do this and have a Dlookup command that
finds my answer (see below) but it does not update immediately in the form
and needs an 'F9' refresh to update.

=DLookUp("[Cost]","[QryFibrecombo1]")

Am I making this harder than it needs to be? Is there a simpler solution?

Thanks
 
You can write on the event of after update of each of the fields
price and length
me.price.requery
so you dont ned to press the F9.
 
Nigel,
I'd try adding the Price (associated with length) into cboLength. For
example the first column contains the length and the second the price.
On the AfterUpdate event of cboLength...
Price = cboLength.Column(1)
(Combo box columns are numbered 0,1, 2, etc...)
Price control is bound to Price field in your table.
Whenever Length changes... so does Price.
hth
Al Camp
 
thx,

I am a "noob" after all

this has done the trick

Ofer said:
You can write on the event of after update of each of the fields
price and length
me.price.requery
so you dont ned to press the F9.

Nigel said:
I need to set up a basic ordering form. In it I have set up a table
containing 'products'.

My products are patch leads which vary in price according to type and
length.

With two combo boxes in a form, one to select a product type and a second
to
select the length, can a third text box find the price using these
parameters?

I have already set up a query to do this and have a Dlookup command that
finds my answer (see below) but it does not update immediately in the
form
and needs an 'F9' refresh to update.

=DLookUp("[Cost]","[QryFibrecombo1]")

Am I making this harder than it needs to be? Is there a simpler
solution?

Thanks
 
Back
Top