autofilling a field in a form base on values selected from three o

B

babs

I have a table that has a delivery yard, pickup yard, and type of
material(2choices). Based on that combination of what is in those three
fields there is a given RATE. On the form based on this table I would like
the rate to automatically fill based on the combination of the 3 fields
chosen. Seems like it should be easy not sure where I go with this.

Thanks,
Barb
 
P

pietlinden

babs said:
I have a table that has a delivery yard, pickup yard, and type of
material(2choices). Based on that combination of what is in those three
fields there is a given RATE. On the form based on this table I would like
the rate to automatically fill based on the combination of the 3 fields
chosen. Seems like it should be easy not sure where I go with this.

Thanks,
Barb

If the rate is _never ever_ overridable by the user, you can base the
form on a query and then calculate as needed. Otherwise, you could
create a function and use it in the Default Value property of the field
in the form. Then you'd need a moderately complex DLookup function to
return the value (or you could build your own function).
 
J

John Vinson

I have a table that has a delivery yard, pickup yard, and type of
material(2choices). Based on that combination of what is in those three
fields there is a given RATE. On the form based on this table I would like
the rate to automatically fill based on the combination of the 3 fields
chosen. Seems like it should be easy not sure where I go with this.

Thanks,
Barb

I'd suggest creating a Rates table with four fields - these three as a
joint Primary Key and the corresponding rate. You can then create a
Query joining your current table to this rate table by the three
fields (two yards and a type) to look up the rate.

John W. Vinson[MVP]
 
B

babs

I did what was recommended below but am having an issue.

How do I incorporate the delivydname(tried adding it as a primary key and
get no records on the query)
I believe this should be Client specific. I am having an issues with having
the same yard numbers for different del yard NAMES

Example:

Prairie Material’s yard # 15(Delivydnum) is Addison(delivydName)

Ozinga Concrete’s yard #15(Delivydnum) is Hampshire(Delivydname).

See prior posting

I have a table that has a delivery yard, pickup yard, and type of
material(2choices). Based on that combination of what is in those three
fields there is a given RATE. On the form based on this table I would like
the rate to automatically fill based on the combination of the 3 fields
chosen. Seems like it should be easy not sure where I go with this.

Thanks,
Barb

I'd suggest creating a Rates table with four fields - these three as a
joint Primary Key and the corresponding rate. You can then create a
Query joining your current table to this rate table by the three
fields (two yards and a type) to look up the rate.

John W. Vinson[MVP]


thanks,
Barb
 

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