Results 1 to 4 of 4
  1. #1
    d9pierce1 is offline Expert
    Windows 10 Access 2016
    Join Date
    Jan 2012
    Location
    Oklahoma
    Posts
    776

    Creating auto increment numbers from txt boxes?

    Hi all,
    This is a two form question...

    I have a simple mach up db i am practicing on (Attached),
    I am trying on ProjectFrm to create a Project Number via cmdbutton. I am trying to use the DivisionNumber, Year (yy) and a random number.
    Should look like this 02-20### (The division - yy random 3 numbers)
    I cant seam to get it to work. I found the code and mod on line for a starter sample but cant get it correct for my desire. There is a error on misuse of null for starters.

    On RFIFrm, I want that same generated project number to transfer to RFIFrm and then automatically generate the RFI number. That should look as 02-20452-001 and so on for each Project.
    So If the project is Raising Canes then i should have RFI number of 02-20452-001, 02-20452-002 and so on but it should start with 001 on each RFI number depending on project. Such as if i


    have Chuck E Cheese, then the incriment would start over...

    This is just a sample db but i put the code in, just cant make it work correctly...Error both forms.

    Thanks
    Dave

    ProjectIncrTest - Copy.zip

  2. #2
    Join Date
    Apr 2017
    Posts
    1,679
    Have a look at my responses to this post https://www.accessforums.net/showthread.php?t=65653

  3. #3
    d9pierce1 is offline Expert
    Windows 10 Access 2016
    Join Date
    Jan 2012
    Location
    Oklahoma
    Posts
    776
    thanks, will give that a shot
    Dave

  4. #4
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,651
    Dave,
    Noticed you are using DLast in some of your code.
    Here's a good article that explains why you may not get the results you expect

    https://codekabinett.com/rdumps.php?...ted-result-set

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

Similar Threads

  1. Replies: 12
    Last Post: 02-07-2014, 04:54 PM
  2. Replies: 13
    Last Post: 05-01-2013, 09:01 AM
  3. Replies: 1
    Last Post: 02-23-2012, 11:48 AM
  4. Renumbering Auto-Increment numbers
    By svcghost in forum Database Design
    Replies: 8
    Last Post: 02-19-2011, 08:48 AM
  5. Replies: 5
    Last Post: 11-12-2010, 12:10 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