I need help making the following code work. Access 2003. The debugger keeps hanging me up on the Set vRS = vDB. xxxxx line (bolded below).
I do not see anything wrong with it.
Private Sub Select_LostFocus()
Dim vDB As Database
Dim vRS As DAO.Recordset
Dim Response As VbMsgBoxResult
Set vDB = CurrentDb
Set vRS = vDB.OpenRecordset("Q_MultipleSelects-OKtoLoad")
If Not (vRS.BOF And vRS.EOF) Then
Do While vRS.RecordCount > 1
MsgBox "You have selected the same pn more than once, please edit to one selection only"
vRS.Requery
Loop
End If
Exit Sub
End Sub