Reputation: 1055
I am using access to create a form.
i was wondering how to i get the current record id when i click a button. I tried "Me.CurrentRecord" in the vb button code. but this done not work. Can anyone help ?
Private Sub save_record_Enter()
Me.CurrentRecord
End Sub
Upvotes: 1
Views: 25691
Reputation: 91376
You can refer to fields in the underlying recordset and form controls in MS Access by name, for example:
Me.ID
MsgBox Me.ID
Me.txtID
Upvotes: 1