There is a continuous form where each record is a separate row. The main purpose of the form is for adding records, but I'm not using the Add data mode. When the user opens the form from the dashboard, it opens to a new record with all the previous records available.
What I'm trying to do is give the user some visual orientation. Instead of having only the new record visible, I want them to see the 5 previous records. Below is how I'm trying to do that, but after selecting the fifth from last record, the error says "You can't go to the specified record" to take me to the new record. Is there another way to do this?
Code: Select all
lRecs = DCount("*", "tblwellspring") - 5 sCalled = "frmWellSpring" With Forms(sCalled) DoCmd.SetOrderBy "SingDate" DoCmd.GoToRecord , , acGoTo, lRecs DoCmd.GoToRecord , , acNewRec End With