Greg,
You can set the Allow Additions property to No; however, you'll need to create a command button with your own code to insert a record into the table that feeds your form. Not difficult.
Is it a subform -- your continuous form? If so, this code, assuming you're running Access 2000 or later, this code placed in the On Click event of a command button will insert a record:
** Code Below **
'NOTES:
'Supposing the table behind the Main form is called TblCustomers
'and that the field holding the primary key is called CustomerID
'Also supposing the table behind the subform is called TblDetails
'and that the field holding the foreign key that links the forms
'is called CustomerID
'some drunken fools are outside in the street fighting and
'yelling their heads off, one man, one woman...
Dim lngRecId As Long
lngrecid = Forms!MainFormName.CustomerID.value
Dim rst As ADODB.Recordset
Set rst = New ADODB.Recordset
rst.Open "tblDetails", CurrentProject.Connection, _
adOpenDynamic, adLockOptimistic
With rst
.addNew
![CustomerID] = lngRecId
.Update
End With
rst.Close
Set rst = Nothing
Me.Recalc
** Code Above **
If your continuous form isn't a subform, but, instead, one that stands on its own, code like the following should work:
** Code Below **
Dim rst As ADODB.Recordset
Set rst = New ADODB.Recordset
rst.Open "YourTblBehindYourForm", CurrentProject.Connection, _
adOpenDynamic, adLockOptimistic
With rst
.addNew
.update
end With
rst.close
Set rst = Nothing
'maybe they're not drunk
DoCmd.Requery
** Code Above **
Regards,
Tim