Results 1 to 4 of 4
  1. #1
    Koolaid is offline Novice
    Windows 8 Access 2016
    Join Date
    Mar 2016
    Location
    Northern VA
    Posts
    26

    Post Sequential Serial Number records


    I appreciate the help in advance. I am not a seasoned MS Access person so this may be easier than I think to create...Here we go. In my table, which I have a form created for it, I put in a lot of information that is the same for many records. The only differing information would be the serial numbers per record. The pain in the butt thing is that I have to currently type each record using one serial number per record in the form. What if I wanted to allow for putting serial numbers 0001 through 0010 in one shot (or one record, since all the other fields are the same anyway) which then creates the ten records vice one? I don't want to have to keep doing one record per serial number is my point without needing to. If there are sequential serial numbers that I have...which happens often, I would like to type in the form once and just have that serial box be allowed for 0001 - 0010 or two boxes one for the beginning serial and the next box for the ending serial. I hope this wasn't too confusing lol Help me if you can please. Thank you! Koolaid

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I think this link should be helpful: http://www.baldyweb.com/CustomAutonumber.htm

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    use this code in the button click once you fill in the start and end textboxes.

    Code:
    Public Sub btnMakeSerials_click()
    Dim iStart As Long, iEnd As Long, i As Long
    Dim sSql As String
    
    iStart = txtBoxStart
    iEnd = txtBoxEnd
    
    DoCmd.SetWarnings = False
    For i = iStart To iEnd
       sSql = "INSERT INTO tTargetTbl ( SerialNo) values (i) "
       DoCmd.RunSQL sSql
    Next
    docmd.opentable "tTargetTbl"
    msgbox "done"
    End Sub

  4. #4
    Koolaid is offline Novice
    Windows 8 Access 2016
    Join Date
    Mar 2016
    Location
    Northern VA
    Posts
    26
    Thank you guys I will check this stuff out. Hopefully I can figure it out lol Koolaid

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

Similar Threads

  1. Tracking products by their given serial number
    By Thomasso in forum Database Design
    Replies: 9
    Last Post: 11-16-2016, 05:21 PM
  2. serial number
    By akellaavss in forum Reports
    Replies: 12
    Last Post: 06-21-2015, 11:07 PM
  3. Processor Serial Number
    By Azeez_Andaman in forum Programming
    Replies: 2
    Last Post: 08-16-2011, 11:33 AM
  4. Help On Creating Automatic of a Serial Number
    By lm_lopes in forum Programming
    Replies: 4
    Last Post: 03-10-2010, 06:47 AM
  5. Replies: 1
    Last Post: 01-31-2009, 10:43 AM

Tags for this Thread

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