 |
| 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
|
|
|
|

November 7th, 2005, 05:57 PM
|
|
Friend of Wrox
|
|
Join Date: Sep 2005
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
InvoiceDueDate: DateAdd("d", [Terms], [Expected Date])
but the System Notes isn't working?
|
|

November 7th, 2005, 06:01 PM
|
|
Friend of Wrox
|
|
Join Date: Sep 2005
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Sorry - InvoiceDueDate: DateAdd("d", [Terms], [Expected Date])WORKS
but:System Notes isn't working
|
|

November 7th, 2005, 09:34 PM
|
|
Authorized User
|
|
Join Date: Sep 2004
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|

November 8th, 2005, 08:41 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
|
|
What exactly is System Notes giving you?
Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
|
|

November 8th, 2005, 09:38 AM
|
|
Friend of Wrox
|
|
Join Date: Sep 2005
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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?
|
|

November 8th, 2005, 09:46 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
|
|
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
|
|

November 8th, 2005, 10:01 AM
|
|
Friend of Wrox
|
|
Join Date: Sep 2005
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Can I e-mail you a sample of the data?
|
|

November 12th, 2005, 06:50 PM
|
|
Authorized User
|
|
Join Date: Oct 2005
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Corey why not try someting like this
=IIf(Me.Terms.Value=Null,"Terms not set",IIF(Date()>[InvoiceDueDate],"Past Due","Not Past Due"))
|
|
 |