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 / February 2008

Tip: Looking for answers? Try searching our database.

Add Records Sequentially with DMAX

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dancox - 06 Feb 2008 07:01 GMT
Where is the proper place in my form to add the following

Area Table  CostCodeLast3  CostCode
1000           001                   10-001
1100           001                   11-001
1200           001                   12-001
                 002                   12-002
                 003                   12-003

I want the next cost code to pop up after I enter the area in a new record.
I know how to combine the last  3 with the first 2 numbers of the area.
I don't know how to make the code select the next last 3 for area.
Maurice - 06 Feb 2008 08:01 GMT
Dan,

I don't know the what the Dmax is for but if you are looking for
concatenation put this in a query:

CostCode: left([area table];2)&right(CostCodeLast3;3)

That should give you the outcome you are looking for.

hth
Signature

Maurice Ausum

> Where is the proper place in my form to add the following
>
[quoted text clipped - 8 lines]
> I know how to combine the last  3 with the first 2 numbers of the area.
> I don't know how to make the code select the next last 3 for area.
dancox - 06 Feb 2008 17:05 GMT
I probably didn't explain clearly.  I can do the concatenation,  but first I
need to add to the previous number when I add a new record. 001, 002, 003
based on selecting the areas.

I have 10 areas and each starts at 001.  I need the form to go find the last
number for that area.  ie. 12-301 add new record 12-302.

I
>Dan,
>
[quoted text clipped - 11 lines]
>> I know how to combine the last  3 with the first 2 numbers of the area.
>> I don't know how to make the code select the next last 3 for area.
 
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.