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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Expression
My first table with expressions worked after I messed with the relationship
of the tables I had such a mess that I started over. Now the expressions aren't working. Pro Rate Table Auto Num Unit MonthlyRent DailyRent [MonthlyRent]/30 StartDate EndDate NumDays [EndDate]-[StartDate] Amt [MumDays]*[DailyRent] Originally I had Monthlyrent getting data from another field =adj rent ..... StartDate got data =LeaseStart+30 all the data is in the same table and the same form any ideas... |
#2
|
|||
|
|||
Expression
=?Utf-8?B?VGVycnk=?= wrote:
My first table with expressions worked after I messed with the relationship of the tables I had such a mess that I started over. Now the expressions aren't working. Pro Rate Table Auto Num Unit MonthlyRent DailyRent [MonthlyRent]/30 StartDate EndDate NumDays [EndDate]-[StartDate] Amt [MumDays]*[DailyRent] Originally I had Monthlyrent getting data from another field =adj rent ..... StartDate got data =LeaseStart+30 all the data is in the same table and the same form any ideas... My idea is to remove DailyRent, NumDays and Amt from the table. There is no need to store those values since you can calculate them whenever needed. On your form you can add unbound fields with expressions like you mention ([MonthlyRent]/30). -- Groeten, Peter http://access.xps350.com |
#3
|
|||
|
|||
Expression
There is nothing intrinsically wrong with the expressions themselves.
Expressions only work in Access 2010 tables. The use of expressions in tables is against all normalization rules and is highly undesirable. The capacity is built in to use with Sharepoint, and has no value outside of that application. So if you are not using Sharepoint, get rid of those fields. If you are not using Access 2010, it won't work in a table. Build queries with the expressions and you will be fine. -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.accessmvp.com http://www.mvps.org/access "Terry" wrote in message ... My first table with expressions worked after I messed with the relationship of the tables I had such a mess that I started over. Now the expressions aren't working. Pro Rate Table Auto Num Unit MonthlyRent DailyRent [MonthlyRent]/30 StartDate EndDate NumDays [EndDate]-[StartDate] Amt [MumDays]*[DailyRent] Originally I had Monthlyrent getting data from another field =adj rent ..... StartDate got data =LeaseStart+30 all the data is in the same table and the same form any ideas... |
#4
|
|||
|
|||
Expression
On your form you can add unbound fields with expressions like you
mention ([MonthlyRent]/30). The daily rent would be monthly * 12 / divided by the number of day in the year, bearing in mind that leap years have an extra day and, as leap years are divisable by 4 you could use something like this This assumes you want the current year ? IIf(Int((DatePart("yyyy",Date()])/4))=(DatePart("yyyy",Date())/4),(([MonthlyRent]*12)/366),(([MonthlyRent]*12)/365)) Just a thought :-) -- Wayne Manchester, England. "XPS35" wrote: =?Utf-8?B?VGVycnk=?= wrote: My first table with expressions worked after I messed with the relationship of the tables I had such a mess that I started over. Now the expressions aren't working. Pro Rate Table Auto Num Unit MonthlyRent DailyRent [MonthlyRent]/30 StartDate EndDate NumDays [EndDate]-[StartDate] Amt [MumDays]*[DailyRent] Originally I had Monthlyrent getting data from another field =adj rent ..... StartDate got data =LeaseStart+30 all the data is in the same table and the same form any ideas... My idea is to remove DailyRent, NumDays and Amt from the table. There is no need to store those values since you can calculate them whenever needed. On your form you can add unbound fields with expressions like you mention ([MonthlyRent]/30). -- Groeten, Peter http://access.xps350.com . |
#5
|
|||
|
|||
Expression
Amen to everything Arvin said! Also, you have a typo
Amt [MumDays]*[DailyRent] MumDays should be NumDays. Whether this simply is a typo in your post here or a typo in your expression, I can't tell, of course. -- There's ALWAYS more than one way to skin a cat! Answers/posts based on Access 2000/2003 Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...ccess/201005/1 |
Thread Tools | |
Display Modes | |
|
|