RE: Automate a default value

From: Ken Warthen (KenWarthen_at_discussions.microsoft.com)
Date: 12/22/04


Date: Wed, 22 Dec 2004 06:49:19 -0800

Lin,

With something of a better understanding of your goals and knowing you're
looking for a simple solution without having to write a bunch of code, here's
what I would suggest. Create a table (tblRecapDate) with one date/time field
called RecapDate. Enter the current recap date in the that field. Close the
table. Open your form in desgin view and in the default value field for the
Recap Date control enter =Dlookup("[RecapDate]","tblRecapDate"). Now
whenever you enter a new invoice it will have the current RecapDate value in
the Recap Date field. You will have to change the value of the RecapDate
field in tblRecapDate every two weeks or whenever it changes, but that may be
easier for you to maintain than writing procedures to automate the process.
Hope this helps.

Ken

"Lin Light" wrote:

> Close.
> All invoices coming in and being recorded are given the same date if they
> fall within that current Recap period. For the weeks of Dec 6 - 17th the
> recap date is that following monday, Dec 20th. On the 20th all invoice are to
> be sent to City Hall for payment. So we record the invoice date [from the
> invoice] and we record the recap date. It works as another checking or
> sorting value. What I want to do is have that recap date, which changes
> every two weeks, automatically populate that field in the invoice data entry
> form.
>
> "Ken Warthen" wrote:
>
> > Lin,
> >
> > I'm not 100 percent sure I understand your question. Do you want the form
> > to show the current date in the Recap Date field for any new records that
> > will be added? If so, you can accomplish this by opening the data entry form
> > in design view and entering =Date() in the Default Value properties of the
> > Recap Date control. If that's not what you're trying to do, I apologize.
> >
> > Ken
> >
> > "Lin Light" wrote:
> >
> > > I'm rewording my a question. I need to allow a change to a fields default
> > > value but not via access to the property *** or form design. I need to
> > > have the date value (Recap Date)in our invoice data entry form set and
> > > automatically populate when entering a new record. I'm using a Switchboard,
> > > so I would like to design a simple form to do this.
> > > --
> > > Lin Light Herrick District Library