J
John F.
Hi,
I have a subform and a button that I want to click to enter a new record on
the subform. I've tried the following but it doesn't do anything. When I
click the 'Add New Record' on the bar at the bottom of the subform, it opens
to a new record; this is the action that I want to replicate on my button.
How do I d this?
This is the code that doesn't work:
Private Sub btnAddNewAdmission_Click()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = CurrentDb()
Set rs = db.OpenRecordset("tblAdmitDateLocation")
rs.AddNew
rs.Bookmark = rs.LastModified
Thanks in adavance!
John Fowler.
I have a subform and a button that I want to click to enter a new record on
the subform. I've tried the following but it doesn't do anything. When I
click the 'Add New Record' on the bar at the bottom of the subform, it opens
to a new record; this is the action that I want to replicate on my button.
How do I d this?
This is the code that doesn't work:
Private Sub btnAddNewAdmission_Click()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = CurrentDb()
Set rs = db.OpenRecordset("tblAdmitDateLocation")
rs.AddNew
rs.Bookmark = rs.LastModified
Thanks in adavance!
John Fowler.