473,770 Members | 2,144 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access - Need Help Calculating in a Table

1 New Member
Ive Created a Access Data Base, and on my main table I have a field titled "Date Entered", which has the lists the date the record was created (through date() formula). What I want to do is have another field in that table that caculates the difference in days from the "date entered" column to the current date. I was using the formula:

datediff("dd", [date entered], date())

I am receiving the the error of "does not recognize the field "date entered", I think I have all the same format for the dates, but am really stumped by this one, so if anybody can give any suggestions to get this caculation, please let me know, this is my first database.
Oct 20 '08 #1
1 1487
Stewart Ross
2,545 Recognized Expert Moderator Specialist
When you say 'table', is that what you really mean? You cannot place such a calculated field in the underlying table. It has to be placed in a query based on that table. The form of the SQL is similar to:

Expand|Select|Wrap|Line Numbers
  1. SELECT <other fields>, datediff("dd", [date entered], Date()) as DaysDiff
  2. FROM yourtable;
If this is indeed what you are doing then you must check that the field's name is indeed 'Date Entered'. If it is, then to rule out any further problem with the DateDiff function itself you can simply subtract the dates directly to obtain the difference in days:

Expand|Select|Wrap|Line Numbers
  1. SELECT <other fields>, Date() - [date entered] as DaysDiff
  2. FROM yourtable;
-Stewart
Oct 20 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
2298
by: Heath | last post by:
I have serious Access problems so please be gentle. I have one table that stores the quantities and net sales for thousands of Products. I have another table that has fixed costs values on a country level. I need to apply a percentage (based on net sales) of the fixed costs across the products.
6
2726
by: Michael Bulatovich | last post by:
I have a very simple db I use for keeping track of hours, tasks, projects, clients etc. It has a form that I use to enter data. Currently the form has a textbox for a field called "start time", another for a field called "end time" and a third for a field called "hours", among other controls. I now type in the approximate times in the first two textboxes, and mentally calculate and enter the difference or elapsed time in the third. I...
3
2173
by: Iain Miller | last post by:
Can anybody help me with some Access 2000 code? I don't do a lot of coding in Access & so every time I come back to do something I pretty much have to relearn the syntax from scratch so this is taking me hours. As with most occasional programmers its the commas, colons, inverted commas, square brackets etc etc that cause the problem! (Not to mention the nuances of using Do While, Do until, Case statements If statements, IIF etc etc...)...
2
2536
by: kuhni | last post by:
Hi everybody! After searching newsgroups for a couple of hours, I now try asking directly (running the risk of asking again the same question). My problem is to predict when the size of the database (1GB I expect) is over 1GB by calculating the maximal number of data sets (tuple) added: 1. Is the following calculation for estimating the mdb file size in Access 97 correct: 1 integer field = 4 Byte
10
47850
by: tkq | last post by:
I have a normal table with customer information I have a DoB field and I want to have an automatic calculation that will show the age of the customer in another field next to it called Age Could you please help me with this Thanx all
5
2916
by: B1ackwater | last post by:
We've fooled around with Access a bit, but only using the single-user store-bought version. It seems to be a good database - versatile and infinitely programmable - and can apparently be used as a front end to SQL server if we ever needed to go that route. But - is there a client/server version of Access ? Looking on the CDW site there is a bewildering variety of packages and licences and such, but we can't figure out just which do...
9
15775
by: =?Utf-8?B?c3Jpbml2YXM=?= | last post by:
Hi All, Can anybody please help me, how to access all rows in a grid view if the paging is enabled? If gridview contains 100 rows and pagecount=10, then in the gridview.rows collection, i'm getting only those 10 rows which are displayed on the screen. But i want to access all the 100 rows in the code. Thanks in advance
10
15990
by: Nightspeace | last post by:
Hello Everyone, I am currently trying to create a 3 month running wieghted average to forecast the comming months. My Table consits of 3 colums (Table ID), (Date),(Monthly Total). (Table ID) contains the numbers 1 to 31, (Date) runs from 1/1/2005 to 7/1/2007. What I need to do is make a query that will add up the last three months and calculate the weighted average. That average would be the forecasted value for 8/1/2007. This...
2
1416
by: Lumpy | last post by:
This question isn't relating to some specific piece of code, but more along the lines of the logic or best method I should use with access 2003 and VBA. I am new to access programming and I am unsure about the best way to get this done. So, let me attempt to explain what I am looking to do. I am building a database to keep track of quotes given out by a company. Pretty much they want a quote form, that they can bring up and put the quote...
3
1604
by: perfectclick.ng | last post by:
I'm a beginner of MS Access, I need adequate knowledge on how to programme. I have a challenge in my office to write a pragramme that will calculate a compensation for all our distributors. This is a network marketing company that has so many distributors, and almost all the distributors are introduced by one distributo or other. For example: Mr. A introduce Mr. B, Mr. B introduce Mr. C, And Mr. C introduce Mr. D.
0
10101
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9906
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8933
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7456
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6712
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.