Results 1 to 7 of 7
  1. #1
    yameen.malix is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2014
    Posts
    4

    A Serial Number Which Automatically Resets Every Day

    Regards,
    I am working on a database,
    structure of database tblaccounts: glcode,description.
    tbltransaction: transaction ID, glcod, tranxtype, amount, trandate


    Everything is going well, when i make a transc ,transcid genrated

    i,e 1,2,3,to 47,48,49,50 and so on. In this case there are minimum 50 transaction on daily bases,
    Here i have an idea that daily after 11.59pm ,i mean after changing date ,when i make a transction, transction id or sequence no start from 1, and my last day data will also remain safe .


    This is what I am trying to accomplish I need to be able to create a serial number which automatically resets every day so I may use it to easily know how many records were created per day, without running a report., any Idea .help will be appreciated .
    Last edited by yameen.malix; 02-09-2014 at 12:10 AM. Reason: Correcting post title "Aset" to Reset

  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
    52,915
    Custom unique ID is common topic. Search forum. Here is one: https://www.accessforums.net/forms/n...lly-41161.html
    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
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,725
    yameen

    Why would you want to do that? I'm not saying you can't, I'm just curious as to why?
    You will find many things easier with database if you design tables with atomic fields. If you want a date add a Date field, or Date and Time. Just suggesting things are easier and make life simpler with 1 fact 1 field.

    Good luck with your project.

  4. #4
    yameen.malix is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2014
    Posts
    4
    Quote Originally Posted by yameen.malix View Post
    Regards,
    I may use it to easily know how many records were created per day, without running a report.,.
    I am quoting my self, i have asked before that i want to know how many records were created per day, without running a report.
    Dear Orange , I am working in a bank (UBL) , when i make a transaction in our (Bank) system a document number generated in our system against that transaction, and after day end , each day when we make our first transaction the document no start from 1, i mean document no rest daily after 12:00pm , and i want to Apply t
    hat technique in my database (if it is possible in Ms Access). i think you understand.
    I am using transaction id as a auto number, but transaction id is increasing day by day, for this reason i want another counter for my database that will rest after a day.
    Regards....

  5. #5
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Why would you not be able to use a query? That is like saying you want to travel on the freeway without a vehicle. Include a timestamp (somewhere) and create a query. I guess you could use a domain function. That might fall within your prerequisite.

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,915
    A record count for the current day's records can be calculated on form much more easily than generating unique identifier. Add date/time stamp field ItsMe suggested.
    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.

  7. #7
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,725
    I suggest you get some basic training in database principles and table design.
    I agree with ItsMe you have a poor/mixed-up understanding of databases, queries.....

    I'll make a different analogy --suppose someone said "Yameen, you want to fly this airplane?
    Would you jump in to the pilot's seat and hope for the best, or would you consider some training in the basics of piloting?

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

Similar Threads

  1. Automatic Serial Number in Report
    By jamil_kwi in forum Reports
    Replies: 11
    Last Post: 01-19-2015, 11:09 AM
  2. Increment part of a serial number
    By swavemeisterg in forum Forms
    Replies: 10
    Last Post: 04-15-2013, 01:59 PM
  3. Replies: 6
    Last Post: 03-21-2012, 07:13 PM
  4. Processor Serial Number
    By Azeez_Andaman in forum Programming
    Replies: 2
    Last Post: 08-16-2011, 11:33 AM
  5. Help On Creating Automatic of a Serial Number
    By lm_lopes in forum Programming
    Replies: 4
    Last Post: 03-10-2010, 06:47 AM

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