Access 2013 : Query to check warranty validity using today's date

Excel2006

Active Member
Joined
Dec 19, 2006
Messages
455
Hi

I created a query which should inform me whether a device's Warranty is valid or not. ( please see below )

=IIf([MAIN Echo Appliance List with warranty & SQL & space type]![Warranty Expiration Date]>=[Today],"Valid","Expired")

When I ran the query in the form, I received a #NAME? error.

Where am I going wrong?

Regards

excel2006
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Do you actually have a field in your table named "Today"?
If not, and you are just trying to compare to the current date, use this:
Code:
[COLOR=#333333]IIf([MAIN Echo Appliance List with warranty & SQL & space type]![Warranty Expiration Date]>=[/COLOR][COLOR=#0000ff][B]Date()[/B][/COLOR][COLOR=#333333],"Valid","Expired")[/COLOR]
 
Upvote 0
Hi Joe4

Thanks for your help. However, I still get the same error.

Maybe the way I am going through the process is incorrect.

In design view, I used the text box to create a box where I could insert the formula.

Should I be using the IIf function?
 
Upvote 0
In design view, I used the text box to create a box where I could insert the formula.
No, you should be doing it as a calculated field in your query.
Then, you can just drag that calculated field from the "Add Existing Fields" list in design view of your Form (as long as the Form uses the Query as its Control Source).
 
Upvote 0

Forum statistics

Threads
1,221,704
Messages
6,161,390
Members
451,701
Latest member
ckrings

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top