Input form that autocreates a new month

C

Chuck W

Hello,
I want to create a continuous input form based on a table called tblUnits (I
have not created this table or form yet). The table would have fields such
as 5thFloor, 6thFloor, ICU etc along with a field called Month. Each time a
user creates a new record, it would create a new month similar to how
autonumbers work. Is there a way to do this? I would want them to see the
month name at each record level so that they know what month they are
inputing information to.

Thanks
 
K

KARL DEWEY

Have a DateTime field in your table with default =Date() and in the
query/form format for month display.
Create an On Open event that appends a record if none exist matching current
month.
 
B

Bob Quintal

Hello,
I want to create a continuous input form based on a table called
tblUnits (I have not created this table or form yet). The table
would have fields such as 5thFloor, 6thFloor, ICU etc along with a
field called Month. Each time a user creates a new record, it
would create a new month similar to how autonumbers work. Is
there a way to do this? I would want them to see the month name
at each record level so that they know what month they are
inputing information to.

Thanks

Note that recurring field names (5thFloor, 6thFloor) is usually a bad
idea in table design.
You will be better off using a table with the structure
dtOfEntry, (date/time), Unit, text (e.g. 'ICU','5 West') (or number
relating the floor text to its ID number in a lookup table) , and a
column for the data.

There are many reasons for this, mostly being that getting statistics
are much easier, and the ease of adding a unit.

That said, the answer to your question is that using either your or
my table structure, you make the default value of dtOfEntry date() or
better yet DateSerial(year(date()),Month(date)),1). Then set the
format to "mm".
 

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