Query by Combobox

nickw1001

New member
Local time
Today, 07:54
Joined
Jul 22, 2007
Messages
3
Hi people.

I am creating a database for my dad's business. I am nearly finished but there is one more function that he needs from it and I have scoured the forums here and the web to try to find an answer to no avail.

Basically I want to design a query which returns a total VAT amount for jobs invoiced by quarter of a year. Looking at the forums etc I have found a way to query using the combobox where the values in the combobox are the table values, and I found a way of the query prompting for the start-finish dates, but the combobox that I want to use won't relate to any existing field headings (if that makes sense) ie option1 would be q1 (ie Jan, Feb & March) option2 would be q2 (April, May & June) etc. In my Invoices table, the VAT figure is already worked out for each invoice and is stored in a seperate field, so I don't need the query to work out the figure, but I just need help to set up the query/combobox so that it filters by 3 month's worth of dates as selected in the combobox.

Any help would be much appreciated. I got it to work whereby the query prompts for dates, but remembering the start/finish dates of the quarter seems a bit daft when these could be selected from the combobox.

PS I am quite new to this programming malarky so start from the beginning with any help :D

Thanks in advance

Nik
 
In the query, you can format the date field into "quarters" to match q1, q2 etc in the combobox on the form.

Format([yourDateField], "\qq")


Or to match 2007 q1, 2007 q2 etc with
Format([yourDateField], "yyyy \qq")


See the form and queries in the attached database.
.
 

Attachments

Users who are viewing this thread

Back
Top Bottom