I am trying to make a unique id to a record this is done by using a seperate table that I want to lock when I read it so that nobody else can get the number and then adding on to the number in the table
The VB code for it is
Dim MyDbs As Database
Dim tblNewId As Record
Set MyDbs = "TheNameOfMyDatabase()"
Set tblNewID = MyDbs.OpenRecordset("NytID, dbDenyRead"
tblNewId = tblNewId +1
I get am error in the first sentense "Dim MyDbs As Database" the error massage is "User-defined type not defined"
I got the ideer for this code form faq700-184
The VB code for it is
Dim MyDbs As Database
Dim tblNewId As Record
Set MyDbs = "TheNameOfMyDatabase()"
Set tblNewID = MyDbs.OpenRecordset("NytID, dbDenyRead"
tblNewId = tblNewId +1
I get am error in the first sentense "Dim MyDbs As Database" the error massage is "User-defined type not defined"
I got the ideer for this code form faq700-184