Display targets for current month

C

CW

We have a table in which our targets for inquiries and bookings are held,
month by month. The fields are FinYear, FinMonth, TargetInquiries,
TargetBookings.
I would like these to be displayed on a form which is shown as soon as a
user logs in to the system. (I can deal with that bit, i.e. configuring the
Startup options to show that form).
But how do I make the form date-sensitive so that it recognises the current
year and month and shows the values from the appropriate row of the table? I
guess I need a query that does this and then feeds the form, but how, please?
Many thanks
CW
 
K

kc-mass

Try this:

SELECT FinYear, FinMonth, TargetInquiries, TargetBookings
WHERE FinYear = Year(Now()) AND FinMonth = Month(Now())

Regards

Kevin
 
C

CW

Thanks Kevin (it didn't work first time and then I realised (duh!) I needed
to add the source table to it, i.e. FROM tblTargets) and then it did the job
perfectly
Thanks again
CW
 
D

De Jager

CW said:
We have a table in which our targets for inquiries and bookings are held,
month by month. The fields are FinYear, FinMonth, TargetInquiries,
TargetBookings.
I would like these to be displayed on a form which is shown as soon as a
user logs in to the system. (I can deal with that bit, i.e. configuring
the
Startup options to show that form).
But how do I make the form date-sensitive so that it recognises the
current
year and month and shows the values from the appropriate row of the table?
I
guess I need a query that does this and then feeds the form, but how,
please?
Many thanks
CW
 

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