Limit form to one record?

PARSO

Registered User.
Local time
Yesterday, 23:05
Joined
Dec 13, 2004
Messages
66
this is probably really simple...

is it possible to only allow one record to be added on a subform.. or a form for that matter?

currently i have a form which contains sub forms and i only want the subform to contain 1 record but i will have many records on the main form, if that makes sense.
as the one record will only need updating and will never need an additional record.

form = many record
subform A = only 1 record per form record.
 
Relationship

Parso,

You may try following:

Reverse relationship from one-to-many to many-to-one. Set your main form as continues form and subform as single form. May be you also need to change the place of subfom. Normally we do place the subform below the main form. But if you place your subform at top and main form at bottom, it is better. But it depends upon your need.

Hope this will help.

Regards,
Ashfaque
 
Last edited:
allow one record

in subform's afterinsert event
make allowadditions of subform to false
it will not allow u to insert next record.
i.e.
Private Sub Form_AfterInsert()
Form.AllowAdditions = False
End Sub
 

Users who are viewing this thread

Back
Top Bottom