A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

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



 
 
Thread Tools Display Modes
  #1  
Old August 31st, 2006, 08:06 PM posted to microsoft.public.access.forms
babs
external usenet poster
 
Posts: 409
Default autofilling a field in a form base on values selected from three o

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
  #2  
Old August 31st, 2006, 08:51 PM posted to microsoft.public.access.forms
[email protected]
external usenet poster
 
Posts: 264
Default autofilling a field in a form base on values selected from three o


babs wrote:
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).

  #3  
Old August 31st, 2006, 08:52 PM posted to microsoft.public.access.forms
John Vinson
external usenet poster
 
Posts: 4,033
Default autofilling a field in a form base on values selected from three o

On Thu, 31 Aug 2006 12:06:01 -0700, babs
wrote:

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]
  #4  
Old October 9th, 2006, 07:31 PM posted to microsoft.public.access.forms
babs
external usenet poster
 
Posts: 409
Default autofilling a field in a form base on values selected from thr

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

On Thu, 31 Aug 2006 12:06:01 -0700, babs
wrote:

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


"John Vinson" wrote:

On Thu, 31 Aug 2006 12:06:01 -0700, babs
wrote:

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]

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:02 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.