date filter or expression for quary

  • Thread starter Thread starter thinkpositive
  • Start date Start date
T

thinkpositive

I need help with a filter to give me a result of current month and anything
before

thanks
Brian
 
I need help with a filter to give me a result of current month and anything
before

thanks
Brian

SELECT *
FROM MyTable
WHERE SomeDate<DateSerial(Year(Date()),Month(Date())+1,1)
 
i have a service date on my database in which I want only to view services
this month and past dates that are not yet removed from the list. I don't
want services that are not due even though they have a date in the list past
this month to be viewed untill the next month
 
i have a service date on my database in which I want only to view services
this month and past dates that are not yet removed from the list. I don't
want services that are not due even though they have a date in the list past
this month to be viewed untill the next month


Ummmm...

And how was Piet supposed to know that?

And how are any of us supposed to know anything about the structure of your
table, such as the nature of the list?

Give us some help here please!
 
i have a service date on my database in which  I want only to view services
this month and past dates that are not yet removed from the list.  I don't
want services that are not due even though they have a date in the list past
this month to be viewed untill the next month
I think John's right. Think of this forum this way - we cannot see
your database, so we are depending on you to tell us what's going
on... sorry, my psychic abilities aren't up to knowing what you are
doing without you telling me.

service dates this month. (Get the first of this month. - use
dateserial and year(date()) and day(date()) then get everything less
than that that's not "removed from the list".
 
sorry i am new to getting help from others I have been working on this for
the past two years and not sure how to explain myself.
I will try better
I have created a service program for the company i work for more as a hobby
or to see if i could help the business in some areas.
it schedules services for the mechanics and should print out a report or
service sheet that the mechanics use to do there job.
the criteria filters out the specific mechanic and company they are assigned
to service. My problem is that it also shows by an next service date all
services even into the future. as they only service the mechines in the month
or if they missed a sceduled service I wished to show that in the report. not
any sheduled services in the future.
the calculation to get the next service date is working correctly. it is i
would like to filter the information automaticly without adding a parameter
each time you print a report.

Thanks
Brian
 
thinkpositive said:
sorry i am new to getting help from others I have been working on
this for the past two years and not sure how to explain myself.
I will try better
I have created a service program for the company i work for more as a
hobby or to see if i could help the business in some areas.
it schedules services for the mechanics and should print out a report
or service sheet that the mechanics use to do there job.
the criteria filters out the specific mechanic and company they are
assigned to service. My problem is that it also shows by an next
service date all services even into the future. as they only service
the mechines in the month or if they missed a sceduled service I
wished to show that in the report. not any sheduled services in the
future.
the calculation to get the next service date is working correctly. it
is i would like to filter the information automaticly without adding
a parameter each time you print a report.
I think you missed the point where John was asking about the structure of
your table: field names and datatypes are always helpful.
 
sorry i am new to getting help from others I have been working on this for
the past two years and not sure how to explain myself.
I will try better
I have created a service program for the company i work for more as a hobby
or to see if i could help the business in some areas.
it schedules services for the mechanics and should print out a report or
service sheet that the mechanics use to do there job.
the criteria filters out the specific mechanic and company they are assigned
to service. My problem is that it also shows by an next service date all
services even into the future. as they only service the mechines in the month
or if they missed a sceduled service I wished to show that in the report. not
any sheduled services in the future.
the calculation to get the next service date is working correctly. it is i
would like to filter the information automaticly without adding a parameter
each time you print a report.

You're describing the business situation, which is indeed helpful background.

What you have not posted is any description of the actual structure of your
database. What are the names of your Tables, with the names and datatypes of
the relevant fields? What real-life Entity does each table represent? How are
the tables related? Could you open the needed queries in SQL view and post the
SQL text here?
 
Back
Top