Continuous form applies only to the first record

I have a continuous form - one of the form fields is RecordID.

I have a label in this form that when I click on it, a message appears with the RecordID in it through VBA:

MsgBox Me.RecordID 

The label is played on each line of the Continuous form, but will only refer to the first record. Although I see that the RecordID field is different on every line of the form, I always get the same result, in this case 80029.

What's up with that?

+4
source share
1 answer

Me.RecordID refers to the RecordID current record, as shown by the black triangle in the record selector:

ContinuousForm

A Label control on the form cannot get Focus , so when you click on a label in another record, the current record does not change and you continue to get the same RecordID . Note: if you put the same code in the Click handler for a text field (or another control that Focus can get), then the current record will change, and you will get the RecordID this record.

+5
source

All Articles