Go Back   Access World Forums > Microsoft Access Discussion > Queries

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 11-26-2013, 03:20 AM   #1
The Archn00b
Newly Registered User
 
Join Date: Jun 2013
Posts: 76
Thanks: 9
Thanked 0 Times in 0 Posts
The Archn00b is on a distinguished road
Question DateAdd Function using existing field values

I have a query in design view that consists of two calculated fields at the moment. One of the calculated fields is supposed to add one year onto a value from another date/time field called "Last_Date."

The expression I've written in the "Field:" box in Query design view is

Expr 2: DateAdd('yyyy',1,[Last_Date])


When I try to run the Query it doesn't work! Access just prompts me to enter a parameter value for Last_Date.

Any ideas? It has to be something simple.

Thanks for reading!

The Archn00b is offline   Reply With Quote
Old 11-26-2013, 03:22 AM   #2
pr2-eugin
Super Moderator
 
pr2-eugin's Avatar
 
Join Date: Nov 2011
Location: Bournemouth, UK
Posts: 8,498
Thanks: 68
Thanked 2,067 Times in 2,014 Posts
pr2-eugin has a spectacular aura about pr2-eugin has a spectacular aura about pr2-eugin has a spectacular aura about
Re: DateAdd Function using existing field values

Make sure you are referencing the Field properly, this include spell check, and at times duplicate fields..

If the Query is a TOTALS Query make sure the Option under the Expr 2 is set to Expression and not Group By..
__________________
Regards,
Paul Eugin

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
!
!
Windows 7 Professional, MS Access 2010
---------------------------------------------------------------------------------------------------------------------
If the above post has helped you, please click the scales
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
or click the 'Thumbs up'. Cheers.

---------------------------------------------------------------------------------------------------------------------



pr2-eugin is offline   Reply With Quote
The Following User Says Thank You to pr2-eugin For This Useful Post:
The Archn00b (11-26-2013)
Reply

Tags
dateadd , existing , field , sql

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apply Replace function to already existing field without creating new one CuriousGeorge Queries 5 04-13-2011 03:03 AM
DateAdd function not working with field name as interval value beanlucy Queries 1 04-15-2010 09:18 AM
Question How to prevent updating existing values in a query field Nilay General 2 02-17-2009 06:10 AM
DateAdd function aziz rasul Modules & VBA 17 09-29-2003 11:30 PM
DateAdd function? Help please Nitrous Queries 1 01-23-2003 03:53 AM




All times are GMT -8. The time now is 04:26 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World