Query criteria problem

A

Aero Mr. E.

I've a table of containing the date and the corresponding consumption. My
purpose is to report the consumption and other fuel properties for a
specified date. I'm getting the date that will be my criteria from 3
comboboxes in my form. All i want to do is to construct the criteria that i
will use in my query from these three combobox values (1-31 first one,1-12
second one and 2000-2009 third one). When i used "AND" in expression builder
access makes them three different criteria. When i use DATESERIAL(e.g.
Date=Dateserial([combobox_year],[combobox_month],[combobox_day]) ; "Date" is
the name of the field in my table) this time i cant get the report depending
on my query. How can i define these three combobox values as a single date?
 
J

Jerry Whittle

Why not just us a calendar control to pick out the date instead of 3 combo
boxes?

With your three combo boxes someone could pick something like 31-06-2009 or
30-02-2009 which are invalid dates. You'll need to trap for that kind of
error.
 
A

Aero Mr. E.

I'm a newbie to access, using it for only 4 days. :) I'm not aware that there
is something like calendar control. I think i need a better tutorial than
mine. Thanks:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top