Working with Today's Date in the Microsoft FrontPage® Database
Results Wizard
Queries in FrontPage can be run using today's date as your criteria,
e.g. if you are creating a calendar, you may want to show only those
events whose date is today or later.
In Access SQL, today's date is expressed as Date().
So, to show only those events whose date is today or greater, your
SQL would look something like this:
"SELECT event,location,event_date,cost FROM calendar WHERE (event_date>=Date());
"
There are two ways to accomplish this in the FrontPage Database
Wizard.
One way is to:
- Run the Wizard
- In Step 3 select More Options |
Criteria | Add
- In the Add Criteria dialogue box, choose event_date as
the Field Name
- Type "Date()" (without the quotes) in the
Value field
- Finish the Wizard
- Switch to HTML view and find your SQL statement
in the gray colored code
- Modify the SQL statement to look like the statement above
- Save your changes while still in HTML view
- Preview your page in your browser.
Add Criteria Dialog Box
The other way is to
- Open your database in Access
- Create the query
- Switch to SQL view
- Highlight and copy the SQL (this will place it on the
Clipboard)
- Close the database
- Open FrontPage
- Open your query page
- Select Custom Query in Step 2
- Paste the SQL (contents of clipboard) into the custom
query window
- Finish the Wizard.