Results 1 to 3 of 3
  1. #1
    !RobG! is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    May 2016
    Posts
    2

    Pre-populatng list box

    Hello all,

    I'm creating a music database. Specifically, for each song I would like to associated a BPM (beats per minute). I like to have my list box display numbers 1 through 200. Is there as quick way to add numbers versus adding them one by one. I was hoping there would be a solution similar to Excel where the cell will continually add the next digit as you drag down.



    Thanks.

  2. #2
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Depends on how , where you want to use such a list. You could create an array very quickly.

    Code:
    Dim BPM(200) as integer
    Dim i as integer
    for i = 1 to 200
       BPM(i) = i
    next i

  3. #3
    Micron is online now Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    You could input the starting digit in Excel and drag down 199 more rows as you alluded to. Then copy the range and Paste Append into your new Access table "tblBPM". Set a form combo box row source to your BPM table.
    Last edited by Micron; 03-05-2017 at 10:29 PM. Reason: spelin
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 4
    Last Post: 08-22-2015, 12:30 PM
  2. Replies: 1
    Last Post: 04-21-2014, 08:00 AM
  3. Replies: 15
    Last Post: 11-20-2013, 04:30 PM
  4. Replies: 2
    Last Post: 04-05-2012, 08:39 PM
  5. Replies: 4
    Last Post: 06-16-2011, 09:30 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