I have 2 tables - Table 1: VendorDate (vendor name, ponum, po date, date out, date in, due date and notes). I'd like to create another field in the same table that calculates the difference between the 2.
Is that possible on the same table? If so I haven't been able to find out how to do that.
Table 2: VendorName (vendor name, and other stuff not relative to the 1st besides the vendor name).
I created a query that creates a 3rd table with PO Num, Date In, Due Date, Vendor Name and in the field area I was using this:
DaysLate: DateDiff("d",[Due Date],[Date In])
When I run the query it creates a PO History table that has mostly what I need. If I change it to an Update Query it gives me:
DateDiff("d",[Due Date],[Date In]) is not a valid name. Make sure it does not include invalid characters.....
My biggest problem is I'd like it enter 0 or 1(or the actual number) if it's late or not instead of the actual numbers of days positive or negative. On my VendorName form I have the VendorDate table showing and also a graph of the average days late. If it's <=0 I'd like it to show just 0 and not go negative. If it's late then just have it average (might change it to count, still working on the requirements for that part) the number of days late.
I tried
DaysLate: Iff(DateDiff("d",[Due Date],[Date In])<=0),0,1)
and it gives me an error.
Not sure where to go from here.
Thanks for any help!
Rob