News:

Do you enjoy all things anime and role playing?  Come on in and take a seat!  Create a character, and let's have some fun! (PS:  Bring your friends, please!!!!)

Main Menu
66 Guests, 0 Users

avatar_Senkusha

Microsoft Access Queries

Started by Senkusha, Sunday, August 14, 2022, 19:50

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Senkusha

So, since I don't really have anywhere to put this out there on the Net, and since I've spent hours searching for this answer without luck, but managed to trip over it by myself:  If you want to base criteria of a query on a form, you need to do something like this:

IIf([Forms]![DatePickerForm]![DatePickerField]<>"",[Forms]![DatePickerForm]![DatePickerField],Date())

What this says is:
If the field DatePickerField on the Form DatePickerForm is not blank, then use the date from the field DatePickerFormField.  If it is blank, then just use the current Date.

This code goes in the criteria blank for the Date field of your Query.

Favored Class:  Magical Girl