Thanks, that works great.
john.
"Tom van Stiphout" wrote:
[Quoted Text] > On Sat, 13 Dec 2008 19:27:01 -0800, John F. > <JohnF[ at ]discussions.microsoft.com> wrote: > > Replace all of that with: > RunCommand acCmdRecordsGoToNew > > -Tom. > Microsoft Access MVP > > > >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. >
|