Hello,
I have a main form with a subform. The subform is bound to a table. I am trying to create a command button that will go to a new record in the subform and also auto-populate a field with the current date. This is the code:
Private Sub cmdNewChkOut_Click()
Me.Controls("frmChckOutHist").SetFocus
DoCmd.GoToRecord acDataTable, "tblChkInOutHist", acNewRec
Me!Reservation_Date = Date
End Sub
When I click on the button I get the run-time error 2489 stating that the bound table is not open. What am I missing? I can see the data in the table displaying in the subform, so I would think it would be open. Any help would be greatly appreciated.
Many thanks!