No more than one record

  • Thread starter Thread starter halaciz
  • Start date Start date
H

halaciz

Guest
I have a form that has subform. The subform includes fields where user enters information. How can i restrict the user so he can not enter more that one record for that subform under the main form??
Your help is appreciated
Rob
 
Something like this in the main form's current event...
Code:
Private Sub Form_Current()
    
    With Me.MySubForm.Form
        If .Recordset.RecordCount > 0 Then
            .AllowAdditions = False
        Else
            .AllowAdditions = True
        End If
    End With
End Sub
 
why use a subform if its a 1 to 1 join? cant you add the two tables together in a query and base the form on that?

Peter
 

Users who are viewing this thread

Back
Top Bottom