runtime3709

jordan0904

Registered User.
Local time
Today, 22:02
Joined
Jul 19, 2000
Messages
13
I'm trying to use a recordset I get this message???
"RUNTIME 3709..THE APP. REQUESTED AN OPERATION ON AN OBJECT WITH A REFERENCE TO A CLOSED OR INVALID CONNECTION OBJECT.
Dim holdstu As ADODB.Recordset
Set holdstu = New ADODB.Recordset
holdstu.open "SELECT personnel.lname,personnel.fname, personnel.rank,studenthistory.Unit, FROM studenthistory inner join personnel on studenthistory.ssn = personnel.ssn where personnel.ssn =[Forms]![pickstud]![Text18]"

What I'm Trying to do, is , if ssn not found return an error message.
 
I FOUND A WAY.....


Dim varX As Variant
varX = DLookup("[ssn]", "personnel", "[ssn] =[Forms]![pickstud]![Text18] ")
If IsNull(varX) Then
MsgBox "SSN Not Found" & (Chr(13)) & "Student Not in Database"
GoTo lastline
End If
 

Users who are viewing this thread

Back
Top Bottom