PDA

View Full Version : Getting Record Number in the Detail Section of a Form



heedaf
04-18-2018, 09:38 AM
Can anyone tell me how I can get the current record number when any field is clicked in the detail section of a continuous form? I can get the value by using the "Click" option for each of the fields but I was wondering if there is an option I can use that is easier. I tried using the "On Click" option for the detail section but it only works when I click between the fields and not when I click on the fields.

OBP
04-19-2018, 04:20 AM
Have you considered including the record number in the Underlying Query that supplies the data, it will then be visible all the time?

heedaf
04-19-2018, 08:15 AM
Have you considered including the record number in the Underlying Query that supplies the data, it will then be visible all the time?

Than you for the reply. My question is more of getting VBA activated to run the same code if any text box is "clicked" in the detail section.

OBP
04-19-2018, 08:44 AM
The only way I know of is to have the code in each Field's On Click or on Focus events.
You can have generic code in there to run code in a module, but it still needs the activatuion in each field.

heedaf
04-19-2018, 08:52 AM
That is what I thought. Would be nice to have that option available.

OBP
04-19-2018, 09:11 AM
Which option?
The Form's On click event would probably do what you want, but it would display the record number whatever the user clicked, ie a close button or any other object.