F
FA
I need help in automating sequential numbers
Here is my Function
Public Function FindingNo(S As String, D As Date, A As String) As
String
FindingNo = S & Format$(D, "dd\/mm\/yyyy") & A
End Function
Here is the command button that populating the concetenated value in
textbox FINDG_NO
Private Sub Command_Finding_Click()
If Me.AT.Value = "AT" Then
Me.FINDG_NO = FindingNo(Me.SYS_CODE, Me.TEST_BEGIN_DATE, Me.AT)
End If
If Me.AR.Value = "AR" Then
Me.FINDG_NO = FindingNo(Me.SYS_CODE, Me.TEST_BEGIN_DATE, Me.AR)
End If
End Sub
I want to add a functionality like this,,,
///// When the user click the command button Finding, it also should
checks the value in Me.SYS_CODE and for the first FINDG_NO for
Me.SYS_CODE ADD "001" to Me.FINDG_NO
For example if Me.SYS_CODE is PGL and Me.TEST_BEGIN_DATE is 01/01/2006
and Me.AT is AT then for the first record for Me.SYS_CODE, Me.FINDG_NO
should look like
PGL01/01/2006AT001. If the user comes back to the form with the same
SYS_CODE and click the command button to create the FINDG_NO, it should
be PGL01/01/2006AT002, and so on,,,.
For the above purpose i have created a tem table called tbltemp and
field called AutoSerial (number) to hold the values for each SYS_CODE.
I think i need to write some codes in the Command_Finding_Click Event.
if someone help me out with this i would be greatly appreciated.
Thanks Alot
Here is my Function
Public Function FindingNo(S As String, D As Date, A As String) As
String
FindingNo = S & Format$(D, "dd\/mm\/yyyy") & A
End Function
Here is the command button that populating the concetenated value in
textbox FINDG_NO
Private Sub Command_Finding_Click()
If Me.AT.Value = "AT" Then
Me.FINDG_NO = FindingNo(Me.SYS_CODE, Me.TEST_BEGIN_DATE, Me.AT)
End If
If Me.AR.Value = "AR" Then
Me.FINDG_NO = FindingNo(Me.SYS_CODE, Me.TEST_BEGIN_DATE, Me.AR)
End If
End Sub
I want to add a functionality like this,,,
///// When the user click the command button Finding, it also should
checks the value in Me.SYS_CODE and for the first FINDG_NO for
Me.SYS_CODE ADD "001" to Me.FINDG_NO
For example if Me.SYS_CODE is PGL and Me.TEST_BEGIN_DATE is 01/01/2006
and Me.AT is AT then for the first record for Me.SYS_CODE, Me.FINDG_NO
should look like
PGL01/01/2006AT001. If the user comes back to the form with the same
SYS_CODE and click the command button to create the FINDG_NO, it should
be PGL01/01/2006AT002, and so on,,,.
For the above purpose i have created a tem table called tbltemp and
field called AutoSerial (number) to hold the values for each SYS_CODE.
I think i need to write some codes in the Command_Finding_Click Event.
if someone help me out with this i would be greatly appreciated.
Thanks Alot