I have a form bound to an empty table. Here is the onopen code:
Dim strsql As String
Dim db As Database
Dim rs As DAO.Recordset
Set db = CurrentDb
Dim strsql2 As String
strsql2 = "DELETE * FROM TestRequest;"
db.Execute strsql2
DoCmd.GoToRecord , , acNewRec
strsql = "SELECT LabNum FROM LabNumber;"
Set rs = CurrentDb.OpenRecordset(strsql)
With rs
.MoveLast
Me![LabNum] = rs![LabNum] + 1
.Edit
!LabNum = Me![LabNum]
.Update
Refresh
End With
rs.Close
Set rs = Nothing
table 'testrequest' has at most 4 records
table 'labnumber' has 1 record
all tables are linked to a backend.
The first time this form is open it can take close to 60 seconds for the form to display. the subsequent times the form opens within 2 seconds. Is there any way to get access to speed this up??
TIA
JEff
Dim strsql As String
Dim db As Database
Dim rs As DAO.Recordset
Set db = CurrentDb
Dim strsql2 As String
strsql2 = "DELETE * FROM TestRequest;"
db.Execute strsql2
DoCmd.GoToRecord , , acNewRec
strsql = "SELECT LabNum FROM LabNumber;"
Set rs = CurrentDb.OpenRecordset(strsql)
With rs
.MoveLast
Me![LabNum] = rs![LabNum] + 1
.Edit
!LabNum = Me![LabNum]
.Update
Refresh
End With
rs.Close
Set rs = Nothing
table 'testrequest' has at most 4 records
table 'labnumber' has 1 record
all tables are linked to a backend.
The first time this form is open it can take close to 60 seconds for the form to display. the subsequent times the form opens within 2 seconds. Is there any way to get access to speed this up??
TIA
JEff