L
Lisa
Below is the code I have on an afterupdate event on a cbo
box on a control. My computer FREEZES at the set db =
currentdb statement.
I have done this type of thing in another XP database and
it was fine.
I did write the code in Access 2000 and it worked fine
there, but when I opened it in Access XP it froze up.
HELP. What am I missing?
I have the following references checked:
Visual Basic for Applications
Microsoft Access 10.0 Object Library
Microsoft DAO 3.6 Object Library
OLE Automation
Microsoft Visual Basic for Applications Extensibility 5.3
Dim db As Database
Dim rec As Recordset
Set db = CurrentDb
Set rec = db.OpenRecordset("qryExistingContact",
dbOpenSnapshot)
With rec
If rec.RecordCount <> 0 Then
MsgBox "This contact and addresscode already exist in the
database." & _
"Please Select the Existing Contact from the list."
SendKeys "{esc}"
rec.Close
Exit Sub
Else
rec.Close
End If
End With
Thank You
Lisa
box on a control. My computer FREEZES at the set db =
currentdb statement.
I have done this type of thing in another XP database and
it was fine.
I did write the code in Access 2000 and it worked fine
there, but when I opened it in Access XP it froze up.
HELP. What am I missing?
I have the following references checked:
Visual Basic for Applications
Microsoft Access 10.0 Object Library
Microsoft DAO 3.6 Object Library
OLE Automation
Microsoft Visual Basic for Applications Extensibility 5.3
Dim db As Database
Dim rec As Recordset
Set db = CurrentDb
Set rec = db.OpenRecordset("qryExistingContact",
dbOpenSnapshot)
With rec
If rec.RecordCount <> 0 Then
MsgBox "This contact and addresscode already exist in the
database." & _
"Please Select the Existing Contact from the list."
SendKeys "{esc}"
rec.Close
Exit Sub
Else
rec.Close
End If
End With
Thank You
Lisa