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
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
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
Sometimes the paper system can defeat the computer system.
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.
Maybe this link will help: http://www.granite.ab.ca/access/serialport.htm