Auto-Populate Based on Other Fields

R

Racer57

I have a table (tblPlants) with four fields - Plant, Size, Supplier, Cost.
In a form, based on another table (tblJobs) I have a Combo box for each of
the first three items. I then want to have the value of tblJobs!Cost set to
the correct value based on the choices for Plant, Size and Supplier. For
example, if I choose Boxwood, 1 gallon, & Philips. I want the form populated
with the cost associated with that record from tblPlants.



tblPlants

Plant
Size
Supplier
Wholesale

Boxwood
1
Philips
$18.45

Boxwood
1
Tinga
$21.45




If I use SetValue & dlookup in a macro, what is the correct syntax for the
Criteria? Or is there an easier way to do it?
 
R

Racer57

Some clarification - in the form frmJobs I have three Combo boxes - one each for plant, size & supplier. The final cost populated should be the cost associated with the record that meets the criteria selected in all three Combo boxes
 

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