Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
| Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 7th, 2005, 05:57 PM
Friend of Wrox
 
Join Date: Sep 2005
Location: , , USA.
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Corey
Default

InvoiceDueDate: DateAdd("d", [Terms], [Expected Date])
but the System Notes isn't working?

 
Old November 7th, 2005, 06:01 PM
Friend of Wrox
 
Join Date: Sep 2005
Location: , , USA.
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Corey
Default

Sorry - InvoiceDueDate: DateAdd("d", [Terms], [Expected Date])WORKS

but:System Notes isn't working

 
Old November 7th, 2005, 09:34 PM
Authorized User
 
Join Date: Sep 2004
Location: Nanaimo, BC, Canada.
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The DateAdd should work, this is good advice.
His comments assume that [Terms] is a Variable for Each Record.
Therefore, this explains why you got #Name before, probably.
You can just use 30 in the [Terms]
If [Terms] is a field, then is it an integer.

Is this on a Form or A Report.
If on a Form, did you use =IIF( ) in the Control Source?

N.B. Its always good idea to not name your fields with spaces, and include the field type in the name of the table field.

Database Agreements
 
Old November 8th, 2005, 08:41 AM
Friend of Wrox
Points: 4,007, Level: 26
Points: 4,007, Level: 26 Points: 4,007, Level: 26 Points: 4,007, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

What exactly is System Notes giving you?

Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
 
Old November 8th, 2005, 09:38 AM
Friend of Wrox
 
Join Date: Sep 2005
Location: , , USA.
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Corey
Default

It shows a error message “#Error” and then after I enter the Terms, the “#Error” disapers and just showed a blank field.
I changed the formula you gave me to: =IIf(Date()>[InvoiceDueDate],"Past Due","Not Past Due")

And now it works but still shows the “#Error” in System Notes & Due Date prior to entering the Terms. Is there a way it can just be blank?


 
Old November 8th, 2005, 09:46 AM
Friend of Wrox
Points: 4,007, Level: 26
Points: 4,007, Level: 26 Points: 4,007, Level: 26 Points: 4,007, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

What do you mean by "entering the terms"? Do you mean that there is no field in the table called "Terms" and that the query is prompting you to enter it on the fly?

If so, that is the problem. The function cannot work without a value for "Terms". You need a field for "Terms" in your table filled with values ahead of time.


Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
 
Old November 8th, 2005, 10:01 AM
Friend of Wrox
 
Join Date: Sep 2005
Location: , , USA.
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Corey
Default

Can I e-mail you a sample of the data?

 
Old November 12th, 2005, 06:50 PM
Authorized User
 
Join Date: Oct 2005
Location: South Ockendon, Essex, United Kingdom.
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Figgis
Default

Corey why not try someting like this

=IIf(Me.Terms.Value=Null,"Terms not set",IIF(Date()>[InvoiceDueDate],"Past Due","Not Past Due"))




Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I make this a IIF Statement Corey Access VBA 1 November 3rd, 2006 08:40 AM
Iif statement in Access rangeview Access 7 March 28th, 2006 01:14 PM
IIF Statement golden Access 2 August 3rd, 2004 01:32 AM
IIF Statement golden Access 3 July 12th, 2004 07:49 PM
IIF Statement Question fastcorvette Access 8 October 31st, 2003 11:01 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.