derek
derek

Reputation: 1055

Microsoft Access - get record id when button is clicked

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

Answers (1)

Fionnuala
Fionnuala

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

Related Questions