Setting a primary number using . . .

G

Gabriella777_2

How could I set a primary key where it is based first on month and year user
enters and second on an autonumber that numbers specific to the month and
year?
I want to enter the Month (Jan, Feb, Mar, etc) the year (08, 09, etc) and
then have it number based on increments of the entries for that month and
year.
Example:
Jan08-01
Jan08-02
Jan08-03
Mar08-01
April08-01
Jan09-01
etc, etc, etc.
I can not do an auto dating set up because the information could get entered
for previous months/years as well as current.
A possible second scenario (?) is a autonumber field that looks at the date
field and numbers based on that. The number does not have to be seen in
final products but would help for keeping certain information together.
This is based on the primary sort order of this tables information for
reports, etc. and the end user of the information (the one who will call the
shots ).
Any help is appreciated.
 
A

akphidelt

Thats a fairly complicated way of doing what you want. It would be easier to
put this information in a query, sort by Date, then sort by ID #. Regardless
of how big the ID # is you will still get the Dates. Also when creating dates
like that when you sort, your are going to start with Apr08, then Aug08, etc.
 
G

Gabriella777_2

The problem is that I am trying to in one step determine not only the
associated date but the order in which they are entered for that date . . .
 
G

Gabriella777_2

sorry - I forgot to add that I want to be able to see that order regardless
of how I display the information in reports etc.
 
A

akphidelt

In your table do you have an Autonumber? Because it might not be 1,2,3,4 for
each of the months, but regardless of the numerical order your months will
still be in order of first entered to last entered.

The IDs might be 1,5,10,12,20... but those are still in sorting order just
like 1,2,3,4,5
 
M

m3

If I understand you correctly, you should break you data into three columns:

tblDating
datingMonth text
datingYear text
datingInMonth integer
.......

order your data in datingMonth, datingYear, datingInMonth order and you're
done.
 
M

m3

Sorry, My mistake. You should order your data in datingYear, datingMonth,
datingInMonth.

m3 said:
If I understand you correctly, you should break you data into three
columns:

tblDating
datingMonth text
datingYear text
datingInMonth integer
......

order your data in datingMonth, datingYear, datingInMonth order and you're
done.
 

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