I am using VB6/Sp6 and running under Windows XP Pro.
I have a Tabled Named SLDNUMBER which has only one record and One Entity also named SldNumber. I am executing my application in a Multi-User environment and I need to allocate a unique number to a record in another table using SldNumber. But despite my code below I am generating a Duplicate Number. I hope you can help me.
Dim rsSld as DAO.Recordset
Call Get NextSld
Private Sub GetNextSld()
On Error GoTo LocalError
Set rsSld = DbSupmCon.OpenRecordset("SLDNUMBER".dbOpenTable, dbDenyWrite+dbDenyRead)
TxtRef.Text = rsSld!SldNumber + 1 (I now have the next available number)
rsSld!SldNumber = TxtRef.Text
set rsSld = Nothing
I display an error message here to trap an error if any, but nothing is reported.