Hello....
When I execute the query, the "InitialContact" appears in the dialog box and
a blank text box. I entered the year and month and get nothing.
:
Try this --
SELECT MainTable.IntialContact, MainTable.NPNAME, MainTable.CPNAME,
MainTable.ControlNbr, MainTable.Notes, MainTable.CSENO
FROM MainTable
WHERE Format([IntialContact],"yyyymm")=Format(Date(),"yyyymm")
ORDER BY MainTable.NPNAME, MainTable.CPNAME;
--
KARL DEWEY
Build a little - Test a little
:
SELECT MainTable.IntialContact, MainTable.NPNAME, MainTable.CPNAME,
MainTable.ControlNbr, MainTable.Notes, MainTable.CSENO
FROM MainTable
WHERE (((Format([Enter Year, Month "yyyy
mmm"],"yyyymm"))=Format(Date(),"yyyymm")))
ORDER BY MainTable.NPNAME, MainTable.CPNAME;
:
Post the SQL of your query by opening it in design view, click on VIEW - SQL
View, highlight all, copy, and paste in a post.
--
KARL DEWEY
Build a little - Test a little
:
Hello and thank you for the quick response.
The process appears to work, but I have some questions. The first one is
where is this condition looking? For example, before the form opens it asks
the user to enter the year and date. In this case I entered "2009 Mar". It
works perfect, but now let's I modify a record on the current month and
change the date to "2009 Feb". I exit the form and reopen the form and see
if that same record will appear for Feb. For some reason that record didn't
move to Feb. The name of my field is called "InitialContact". I thought
[YourDateField] would be where I enter the name of my field, but it only puts
information on the dialog box before the form opens.
Year_Month: Format([YourDateField], "yyyymm")
Click on the check box to turn off display.
In criteria row enter --
Format(Date(), "yyyymm")
Thank you!
:
Same query used every month.
In design view of query scroll to the right to new block field row in the
grid and add calculated field like this --
Year_Month: Format([YourDateField], "yyyymm")
Click on the check box to turn off display.
In criteria row enter --
Format(Date(), "yyyymm")
You will only get records from current month and year.
--
KARL DEWEY
Build a little - Test a little
:
Is there a way to separate data on a form by month? For example, a person is
working on the current month and see all records created for that month and
when the upcoming up arrives, there should be no record to display (unless
records from the previous year appears and those would be purged. I'm not
sure if I need to create a form for each month and/or create a query for each
month.
Thank you,