Strange one!

bodvoc

Red Sea Pedestrian
Local time
Today, 11:09
Joined
May 4, 2003
Messages
54
HELP!!!:confused:

I have a form, based on a query, that loads the form up with the wanted records... A very simple form feeds the query... and all works well......... But!?!

If the user enters a criteria that is not found in the query, the open form vanishes and so does the simple form that feeds it!! Wots happening, any ideas?? is there an on error or if record not found thing I could invoke to reload the search criteria form??

Many thanks all, hope I have explained it well enough

Bodvoc
 
Try...
Code:
Private Sub Form_Open(Cancel As Integer)
        If Me.RecordsetClone.RecordCount = 0 Then
                DoCmd.Close acForm, Me.Name
                MsgBox "There are zero records in the data source!", vbInformation, "No Records Found"
        End If
End Sub
HTH
 
Cheers ghudson :)

Will try that later

Bodvoc
 

Users who are viewing this thread

Back
Top Bottom