Yep, I get it. Nz to the rescue yet again lol. That works great.
Thanks zmbd, much appreciated as always!
Have a great new year everyone!
User Profile
Collapse
-
Hi Guys,
Thanks for the response. I am writing the formulas simply as such:
Code:DealerNet: FormatCurrency([Price]*[Disc])
Thanks for looking at this!Leave a comment:
-
metronj started a topic Exporting to Excel not working if report has an #error in one of the fields.in AccessExporting to Excel not working if report has an #error in one of the fields.
Hi All,
I am trying to do some very simple data exports into Excel sheets utilizing a report format I created and a couple of fields. I use the Filter & Sort menu to get the data I want on screen and then simply right click on the report -->export to Excel.
The problem is that when I have any sort of Error in one of the fields, it won't export at all. Some of my fields are calculated (very simple stuff like... -
Here was the solution:
1)Use an Update query to change the ETA Data Type to Text.
ALTER TABLE Table1 ALTER COLUMN [ETA Date] TEXT
2 Use an Update query with a IIF on the "update to:" line to determine whether or not the ETA date field is NULL. If it is NULL perform the function, if not just redisplay whatever date is in there.
Code:IIf(IsNull([Table1]![ETA Date]),fCalcDate([ETA Date],[Port],[Prod
Leave a comment:
-
Hi ADezii,
Same thing is happening. Here are some screenshots and the code I'm trying:
[IMGnothumb]http://i.imgur.com/OG2eqAS.png[/IMGnothumb]
Code:UPDATE Table1 SET Table1.[ETA Date] = fCalcDate([ETA Date],[Port],[Prod Date]);
Code:Public Function fCalcDate(varDate As Variant, strPort As String, dteProd_Date As Date) As Date If IsNull(varDate) Then Exit Function
Last edited by zmbd; Oct 28 '13, 09:03 PM. Reason: [z{Please keep in mind that many of us can not see images stored in mass online sites}]Leave a comment:
-
Hi ADezii,
Thanks for your reply. I tried that and it set all of my dates to 12/30/1899 lol. I guess you are on the right track but something needs tweaking :)
Let me try to clear up the exact field names I'm using:
[ETA Date] = the date I'm trying to modify.
[Prod Date] = the date I have for sure. This is the date I want to add 50 or 70 days to if [ETA Date] is null and then put that calculated date into...Leave a comment:
-
Help with nested IIF Statement using DateADD.
Hello All,
Recently I was asked to make some changes to some business logic for a report generator I created for our office. Basically what I'm trying to do is this:
1)Evaluate a Date Field
2)If it's populated, leave it alone
3)If it's null, Evaluate a Shipping port field
4)If it's a California port add 50 days
5)If it's a NJ port add 70 days
6)If it's anything else add 60 days.... -
Ahh.
This is Access 2010 and using the "exportwithform atting" option in the list.
Sorry about that.Leave a comment:
-
I figured it out, turns out you HAVE to have the "equal" sign in front of the whole thing:
Code:="C:\Users\someuser\Desktop\Availability Report_" & Format(Date(),"yyyy-mm-dd") & ".pdf"
Leave a comment:
-
How to Append Date to a .pdf export using macros?
Hi again :)
I saw some examples of this being done with excel exports and tried modifying them for .pdf use but I can't seem to get it to work.
I have a macro which is converting some reports to .pdf and I want to append today's date to them since the reports will be stored for historical reference.
Here is the code I have, which I found by searching similar topics around the web, including here :) This is being... -
Hi zmbd,
After a bit more trial and error I was able to get the code snip you pasted to work:
Code:zdatecalc: Nz([datefield_to_check],DateAdd("d",75,[datefield_to_add_days_to]))
Cheers!Leave a comment:
-
Hi zmbd and thanks again for replying. I totally understand that this isn't a code writing service and I may just end up having to pay for someone to do this for me. :(
This is the best I have been able to come up with and it doesn't work. Can you please tell me if I'm on the right track or (even better), please clean it up for me so that it works?
Code:datecalc: IIf(Eval(IsNull([ETA Date])) Or (Eval([ETA Date])=" "),([ETA
Leave a comment:
-
Thanks for the reply zmbd...I should have noted that I only have a background in programming and if you can post the actual code and where to put it I would GREATLY appreciate it. We do not have an IT department in my office and I am trying to do this on my own.
Many Thanks.Leave a comment:
-
Need Help to auto generate a Date in a report.
Hello All, I'll try to be as brief and concise as possible with this question:
I have 2 date fields:
#1 is called "Prod Date" and it will ALWAYS be populated. ex; 1\1\2013.
#2 is called "ETA Date" and may or may not be populated. ex; it may be NULL OR contain a valid date such as 2\1\2013.
What I need to do is this: I have my queries set up to filter out records...
No activity results to display
Show More
Leave a comment: