I am using A2003. The below VBA searches for a record. If the record is not fourd the VBA opens another form using an OpenArg.
The operation works well on my computer.
But it locks-up 10% of the time on user 2's computer, and 95% on user 3's computer.
I have changed the DB's open mode to "exclusive" and I have ensured user 3 is the only one in the application. User 3 is running a 3-4 year old computer.
The operation locks-up before showing the message box. We have to ctr/alt/delete.
Thank you for your help.
The operation works well on my computer.
But it locks-up 10% of the time on user 2's computer, and 95% on user 3's computer.
I have changed the DB's open mode to "exclusive" and I have ensured user 3 is the only one in the application. User 3 is running a 3-4 year old computer.
The operation locks-up before showing the message box. We have to ctr/alt/delete.
Thank you for your help.
Private Sub cmbTask_AfterUpdate()
On Error GoTo Err_cmbTask_AfterUpdate
Dim varExists As Variant
varExists = ELookup("fldTask", "tblTemplate", "fldTask = '" & [cmbTask] & "'")
If varExists > 0 Then
GoTo Refresh
Else
MsgBox ("Please take a moment to create a template for " & cmbTask & ".")
DoCmd.OpenForm "frmTemplate", acNormal, , , acFormAdd, acDialog, cmbTask
GoTo Refresh
End If
Refresh:
Forms!frmLog.Refresh
Exit_cmbTask_AfterUpdate:
Exit Sub
Err_cmbTask_AfterUpdate:
MsgBox Err.Description
Resume Exit_cmbTask_AfterUpdate
End Sub