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 / Forms / March 2007

Tip: Looking for answers? Try searching our database.

Auto-Line-Numbering

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chip - 13 Mar 2007 21:06 GMT
Hi,
I am trying to build a front-end for an existng Purchase Order (PO) SQL
database.  The problem i am having is the line-numbering for the items
purchased on the PO.  

Currently the database has 2 tables, [mmpohd] for the PO Header information
and a table [mmpodt] for the lines of the PO or the items to be purchased on
the PO.  (one record for each item purchased)

On the table mmpodt (for the PO lines) the current form has the user putting
the line-numbers manually which is causing problems for people who do not
follow the prescribed pattern of line number 001, 002, 003, etc.  We have
other reports and queries that depend on the line numbers being in that
format.

So i want the new form i am building to autmatically assign these numbers
for each new line that is put into the database.  I have been playing around
with the 'dmax' statement and no luck.  

Any assistance on this would be greatly, greatly appreciated!!!!

As always THANKS IN ADVANCE!!!!
Chip
Keith Wilby - 14 Mar 2007 09:20 GMT
> So i want the new form i am building to autmatically assign these numbers
> for each new line that is put into the database.  I have been playing
> around
> with the 'dmax' statement and no luck.

This as the default value of the pertinent text box should work:

Nz(DMax("MyField","tblMyTable"),0)+1

Keith.
www.keithwilby.com
 
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.