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 / Database Design / May 2005

Tip: Looking for answers? Try searching our database.

ENTER SAME DATA IN A NEW CELL, FROM THE LAST RECORD

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Donald. - 18 May 2005 05:00 GMT
Microsoft Access 2003.  I am trying to build a data base in which I need to
enter the data for one cell of the last record into another cell in the next
record, automatically, so when the form opens, the information will be
displayed in the cell. how can I do it?
Allen Browne - 18 May 2005 06:07 GMT
In general, this is not a good idea in Access. One of the basic rules of
data normalization is not to store dependent data.

For an alternative approach, see:
   Referring to a Field in the Previous Record or Next Record
at:
   http://support.microsoft.com/default.aspx?scid=kb;en-us;210504

If you want to do it anyway, use the BeforeInsert event of the form to read
the last value, and assign it to the appropriate field. You could use DMax()
to read the higest value assigned so far; if "last" is defined other than
highest, then use ELookup() from this link to specify the sort order to get
the record you want:
   http://allenbrowne.com/ser-42.html

A serious problem with doing it this way is that the user may enter records
out of order, or may need to enter another record that fits between others
logically. In these cases, your interface will produce wrong results, and
since you are storing them in a table, your database gradually becomes more
and more wrong. That's the reason why real data developers would never
consider doing it that way.

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> Microsoft Access 2003.  I am trying to build a data base in which I need
> to
> enter the data for one cell of the last record into another cell in the
> next
> record, automatically, so when the form opens, the information will be
> displayed in the cell. how can I do it?
 
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.