Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20
  1. #16
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Your criteria is fine but it does not need to be the PK. An indexed field if you want, just not the PK. Use an Autonumber for the PK and you eliminate your other issues. Here's a link for this field: http://www.baldyweb.com/CustomAutonumber.htm

  2. #17
    Anacronos is offline Novice
    Windows 8 Access 2013
    Join Date
    Jan 2016
    Posts
    24
    I solved the problem
    The problem was that I was trying to display the information in a textbox so the program ask me to fill it, when it really must be generated.
    So I eliminated that field and now I just keep the recaption function that I originally meant to use. Using the following code.

    Private Sub TxtId_dia_AfterUpdate()
    Me.Id = Format(Date, "YYYYMMDD") & "-" & Me.TxtId_dia
    Me.Caption = "Folio:" & Me.Id
    End Sub

    Now I just put the number in the txtbox (TxtId_dia) the Field If that is not displayed is fill anyways that servers the purpose of indexing and the second line of code changes the name of the form depending on the individual costumer. The reason it can´t be an autonumber field is that sometimes our virtual database is updated after the paper one so, sometimes costumer number 5 is filled in the program before the 1.
    Thank you :3, really thank you :3.
    Last edited by June7; 01-14-2016 at 10:10 AM. Reason: Autonumber

  3. #18
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Sometimes the paper system can defeat the computer system.

  4. #19
    Anacronos is offline Novice
    Windows 8 Access 2013
    Join Date
    Jan 2016
    Posts
    24
    As I go on in the program I´m improving things here and there If I Figure out how to recive date from a port dv9serial and how to generate the paper database from the virtual database XD the computer system will defeat the paper system this time :3.

  5. #20
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Generating unique ID using year/month
    By Integrate in forum Macros
    Replies: 7
    Last Post: 08-30-2015, 10:25 AM
  2. Change number to Year, Month, Days
    By trident in forum Forms
    Replies: 10
    Last Post: 05-25-2015, 08:16 AM
  3. Replies: 11
    Last Post: 11-11-2014, 06:04 PM
  4. Get last ID of primary key automatically generated
    By California2013 in forum Access
    Replies: 1
    Last Post: 09-12-2013, 05:57 AM
  5. Week Number of Month not Year?
    By kwooten in forum Queries
    Replies: 6
    Last Post: 05-01-2013, 06:59 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