View Full Version : Setting a Value on a Form


JenniferF
09-12-2000, 07:12 AM
I have a form in which I need to calculate the Current Month (i.e. Sep). I've done this by creating a text box with the following two properties -
Control Source is "=Now()"
Format is "mmm"

I did this on a test form and it worked perfectly.

However, I also need to filter some records. That is the reason I added a Current Month text box.

When my users open the form, I want them to only see records from the previous month. I wrote If... Then...ElseIf statements for the OpenForm property.

But when I go to look at the form I get a run time error 2448, which means that the value cannot be set.

Does anyone have any suggestions for me as to work around this error or another way that I can see the previous month's records.

Thanks!
Jenn

Richie
09-12-2000, 12:13 PM
Several suggestions Now records time as well as date, Use Date() instead of now to return only the current date for future reference. Next you need to create two queries Add date by month and date serial functions to the first query and group by month sort date serial desc. to display current month the first query will have the second query as it's record source. Add date serial and date by month to the second query and add other required fields sort date serial asc. Create a new main form with query 1 as it's record source add subform from query 2 and link by date by month. Obviously you'll have to create query 2 first.
HTH