Results 1 to 6 of 6
  1. #1
    baronqueefington is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Dec 2014
    Posts
    32

    Dmax Help with unique numbers

    Good evening,

    I have been reading up on unique numbers this evening, especially for split databases and there are a many threads on using Dmax+1.

    I have given it a try and cannot get the field I want to auto +1 when I create a new record.

    I have placed this code =DMax("[DOLS#]","[DolsDataTable]")+1 in the 'before update' for the form but the next record always shows '0'

    I have provided a stripped down version of my database via onedrive.

    http://1drv.ms/1B0hAH4



    Any advice would be much appreciated.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    I can't download from Onedrive now and if the file is very large, not from home later.

    If you attach to post I can download. Follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    baronqueefington is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Dec 2014
    Posts
    32
    Will do, the file includes 1 table and 1form with 2 fields and no data and only the code I've shown above in the form event property.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    I tried your download link from home and it failed.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    baronqueefington is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Dec 2014
    Posts
    32
    Apologies for the slow reply, please find attached a zipped copy.

    Thank you
    Attached Files Attached Files

  6. #6
    baronqueefington is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Dec 2014
    Posts
    32
    Hello again,

    After doing some more reading I have now solved my issue. Thank you for your help.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. DMAx Question for Report - DMax <= Dtae
    By crimedog in forum Access
    Replies: 8
    Last Post: 12-29-2014, 09:31 PM
  2. Replies: 3
    Last Post: 01-28-2014, 02:33 PM
  3. Replies: 22
    Last Post: 03-03-2013, 02:00 PM
  4. Dmax to create unique ID
    By Stika in forum Access
    Replies: 4
    Last Post: 12-23-2012, 03:20 PM
  5. Replies: 6
    Last Post: 07-24-2012, 03:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums