Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / April 2005

Tip: Looking for answers? Try searching our database.

Next Number is...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mloucel - 27 Apr 2005 01:42 GMT
I am a beguiner, I have done a couple of things in Access not a bi
deal, but now my boss wants something I have no Idea what to do, thi
is the scenario
- A database 12 fields.
- 1 Field is called Folder Number (entered manually so far
there is the problem he wants that particular field to change to th
next number automagically as soon as the user click the button save
this button was created using Access own resources (create a butto
and on the button wizard choose record operations and then save
record)
How can I add code so when the user click on save it will read th
last number on the field and add 1, then save the record
also is there any way to display the content of the field but avoi
the users from clicking and making changes on that field.
I'm wondering on the most easy child like type of code, that works..
no fancy work just simple and easy
Thanks for any help.

Maurice.
m l - 27 Apr 2005 03:50 GMT
Bonjour Maurice,
Just to be picky ... you have a database containing one table. The table
contains 12 fields.
OK, make your Folder number an AutoNumber field (that's a Data Type when you
create the table). It will increment automatically every time you create a
new folder. The numbers will go 1, 2, 3, etc. If you want your own number
sequence that's more difficult.
You don't have to save in Access. When you move out of a record it is
written to the table automatically. There is no need for a Save button.
To stop users from making changes to a field, go to the field's properties
and change "Locked" to Yes. I would also recommend that you change "Tab
stop" to No so that when the user uses the Tab key, he'll skip over that
field.

Michel
I have a free tutorial on Access that you might want to check out. It's in
French too, if that helps.
www.profsr.com  Profsr.com Tutorials

>I am a beguiner, I have done a couple of things in Access not a big
> deal, but now my boss wants something I have no Idea what to do, this
[quoted text clipped - 15 lines]
>
> Maurice..
Larry  Linson - 27 Apr 2005 05:49 GMT
Uniquely identify your records by using an AutoNumber value as the
identification field for the record. That will uniquely identify each record
for your internal use. Most of the time, the AutoNumber values will be
monotonically increasing, but that is not guaranteed... numbers may be
skipped for various reasons and groups of numbers may be skipped. Thus, if
you have users who will expect a monotonically increasing sequence of
numbers, don't rely on AutoNumber (in fact, the general recommendation is
that you use them for joins and relationships in your database and never
display them to the user).

If you need a user-viewable number, you'll need to write VBA code to create
that number according to your needs.

Larry Linson
Microsoft Access MVP

> I am a beguiner, I have done a couple of things in Access not a big
> deal, but now my boss wants something I have no Idea what to do, this
[quoted text clipped - 15 lines]
>
> Maurice..
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.