Results 1 to 10 of 10
  1. #1
    fairygirl85 is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2009
    Location
    Cali.
    Posts
    5

    Question How do i automatically generate #'s not starting with 1???

    I need to create a table that can automatically generate numbers starting with 9910080 then go to 9910081 and so on.


    If anyone can help me i would so appreciate it!!! Its for my job and i'm so lost, i can't figure it out. Thanks

  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
    You would use DMax() in the BeforeUpdate event of a form to generate the next number.

  3. #3
    fairygirl85 is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2009
    Location
    Cali.
    Posts
    5
    where do i find DMax on access?? Sorry im not really familiar with access

  4. #4
    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
    VBA Help: <ALT> F11 and then F1
    ...what version of Access are you using?

  5. #5
    fairygirl85 is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2009
    Location
    Cali.
    Posts
    5
    access 2007 on XP

  6. #6
    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
    So just hit F1 and type DMax in the search bar.

  7. #7
    fairygirl85 is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2009
    Location
    Cali.
    Posts
    5
    awesome, thanks!!!!

  8. #8
    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
    You're welcome. Just post back here if you still need assistance on this issue.

  9. #9
    fairygirl85 is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2009
    Location
    Cali.
    Posts
    5
    ahh ok so i read what it said about Dmax on F1 but im still confused. Ive been playing with it but still no success. I opened Insert then Procedure and typed DMax then i entered... nextnumber = Nz(DMax(targetfield, targetdomain), 9910079) + 1
    But im not sure what im not doing right to create a table where i can generate the number?? Please Help!!

  10. #10
    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
    All of the arguments of the Domain functions are strings.
    DLookup Usage Samples

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

Similar Threads

  1. linking forms by ID - automatically add ID
    By jlcaviglia-harris in forum Forms
    Replies: 0
    Last Post: 04-17-2009, 03:51 PM
  2. Generate Image
    By dbman in forum Import/Export Data
    Replies: 0
    Last Post: 01-31-2008, 10:46 PM
  3. Have database open automatically
    By Norman Masson in forum Access
    Replies: 6
    Last Post: 01-08-2008, 07:41 AM
  4. Replies: 1
    Last Post: 03-11-2006, 07:38 AM
  5. automatically create queries
    By GEORGIA in forum Programming
    Replies: 8
    Last Post: 01-23-2006, 02:35 PM

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