I am currently trying to figure out how to limit the entries into a nested sub form to just one.
for example im making wine collection database, I have a PURCHASE table, a WINE table containing the FK of the PURCHASE PK, and an INVENTORY contain the FK of the WINE PK.
a purchase can contain many wines, but one wine can only be in one inventory location.
I am trying to add all this information with one form. I fill out the purchase details, enter the info of X bottles of wine were in the purchase, and then with one of those wines selected in their subform, i enter the inventory details for that wine. I go select the next wine in the first subform and the inventory nested subform doesnt allow another entry.
I have this code loaded into the On Current event for the main form:
Code:
Private Sub Form_Current()
With Me![INVENTORY Subform].Form
If .Recordset.RecordCount = 0 Then
.AllowAdditions = True
Else
.AllowAdditions = False
.AllowEdits = True
End If
End With
End Sub
anyone got any ideas?