Custom Index (1 Viewer)

TurboDieselOne

Registered User.
Local time
Today, 03:09
Joined
Jan 16, 2003
Messages
39
I have this code on a button:-

Private Sub cmdCreateRefNo_Click()
Dim OurRef1 As String
Dim OurRef2 As String
Dim OurRef3 As String
OurRef1 = Year(Date)
OurRef2 = Month(Date)
OurRef3 = 1
If OurRef2 < 10 Then
OurRef2 = "0" + OurRef2
Else
OurRef2 = Month(Date)
End If
Me.txtOurRef = right(OurRef1, 2) + OurRef2 + OurRef3
End Sub

Now when Pressed it gives a result of 04061 now what I whant to do is make this number stored somewhere, aprt from in the field me.txtOurRef whis is a primary key so that I can create a 04062 when the button is pressed on a new record.

Any Ideas
 

Attachments

  • Zimmers.zip
    85.7 KB · Views: 111

SQL_Hell

SQL Server DBA
Local time
Today, 03:09
Joined
Dec 4, 2003
Messages
1,360
I think from the sound of it you could just store it in an unbound text box.
 

TurboDieselOne

Registered User.
Local time
Today, 03:09
Joined
Jan 16, 2003
Messages
39
Done it Thanks
 

Users who are viewing this thread

Top Bottom