Hi.
I'm new here.
I have a scenario that I need help with.
Report has a button on each entry.
When you click on the button, I want to load up the form to that entry and set focus.
I sorta had it but didn’t work exactly the way I wanted.
What happened is that I deleted some records. Now the values appearing in the ID field (primary key) range is at 28-127. 100 actual records, but record 1 has the ID 28. See below for my button code.
If I click on the button, it’ll go the 28th record, not the first record. I tried many times to use google but wasn't able to jerry rig the examples I saw correctly (I'm not that good in Access). Anyway, I pasted all the relevant objects that I think are important.
Private Sub Command3_Click()
DoCmd.GoToRecord acDataForm, "Call Log", acGoTo, ID
Forms![Call Log].SetFocus
End Sub
Object names for the Report
Report Name: “Report1”
Bound object: “ID” (primary key)
Object names for the Form
Form Name: “Call Log”
Bound object: “ID” (primary key)