Form Field Always Null Even When Showing Data

dimanche 3 mai 2015

The code below always displays opens form even when field being tested is null. Any ideas on how to fix that?



Private Sub Assign_Classes_Click()
On Error GoTo Err_Assign_Classes_Click

Dim stDocName As String
Dim msgboxstring As String
Dim stLinkCriteria As String
Me.name_found.Requery


If Not IsNull(Me.name_found) Then

DoCmd.SetWarnings False
DoCmd.OpenQuery "Qry_Load_Client_Classes"
DoCmd.SetWarnings True

stDocName = "Frm_Class_Selection"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Else
msgboxstring = "Client Not Found"
MsgBox (msgboxstring)
End If


Exit_Assign_Classes_Click:
Exit Sub

Err_Assign_Classes_Click:
MsgBox Err.Description
Resume Exit_Assign_Classes_Click

End Sub
Form Field Always Null Even When Showing Data

0 commentaires:

Enregistrer un commentaire

Labels