Consulting

Results 1 to 6 of 6

Thread: Getting Record Number in the Detail Section of a Form

  1. #1
    VBAX Contributor
    Joined
    Jun 2014
    Posts
    107
    Location

    Getting Record Number in the Detail Section of a Form

    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.

  2. #2
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    Have you considered including the record number in the Underlying Query that supplies the data, it will then be visible all the time?

  3. #3
    VBAX Contributor
    Joined
    Jun 2014
    Posts
    107
    Location
    Quote Originally Posted by OBP View Post
    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.

  4. #4
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    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.

  5. #5
    VBAX Contributor
    Joined
    Jun 2014
    Posts
    107
    Location
    That is what I thought. Would be nice to have that option available.

  6. #6
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •