Add a Record field?

  • Thread starter Thread starter Joe
  • Start date Start date
J

Joe

Hello,
I have a simple database that I enter Club Members these members have a card
which has an ID number that is now my primary field.
My problem is the database sorts by that ID number and the cards aren't
issued in numerical order.
I need it to be able to sort by an entry number so that when I add 25 new
records to the database I can then print records 225-250 in a flyer mail
merge. Right now when I enter 25 new members they get lost in the database.
Can I easily ad an automatic entry number field and if so how?

Joe
 
if only one user enters data in the table at any given time, rather than
multiple users, it's easy enough. add an Integer field (i'll call it SortBy)
to your table (i'll call it tblMembers). add the field to the RecordSource
of the data entry form. in the form's BeforeInsert event procedure, add the
following code, as

Me!SortBy = DMax("SortBy", "tblMembers") + 1

hth
 
Thanks Tina,

Yes, only one user at a time.
Are you talking about adding it to the table that shows the field names and
below that, field properties?
Record Source?
I really don't have a clue as to what your talking about. Could you treat me
as a 5 year old, and explain step by step.
I have a database that has Table1 under Tables Tab, and the same under the
Forms Tab. I enter info in the form.
 
comments inline.

Joe said:
Thanks Tina,

Yes, only one user at a time.
Are you talking about adding it to the table that shows the field names and
below that, field properties?
yes.

Record Source?

open the form in Design view. press Alt+Enter to show the Properties box.
select the All tab; the RecordSource property is at the top of the list. if
the value in the property is "Table1" (without the quotes), or "SELECT *
FROM Table1" (again, sans quotes), then you're fine.
I really don't have a clue as to what your talking about. Could you treat me
as a 5 year old, and explain step by step.

in the Properties box, click on the Event tab and scroll down to the
BeforeInsert event. from there, follow the instructions in the link i gave
you in previous post.

Joe, i strongly recommend that you invest in a basic Access "manual"; you
need to learn some of the fundamentals of the software so you can use it
with some ease and efficiency. since you're building your own database (your
first, i'm guessing), you also need to learn the basics of data
normalization - without that, using Access is like driving a car without
learning any of the rules of the road - you're a danger to yourself and
others! <g> for more information, see
http://home.att.net/~california.db/tips.html, starting with tips #1 and #2.

hth
 

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

Back
Top