• VBA for Recordselector.Click (XP)

    Author
    Topic
    #450133

    Hi

    I have a datagrid view subform that you can click on to select records. i want the form to automatically select the whole row (as if you clicked on the record selector) whenever a cell is clicked / moved to.
    Im sure this should be simple in VBA – can anyone help?

    Thanks

    Viewing 0 reply threads
    Author
    Replies
    • #1105279

      Try this:

      Private Sub Form_Current()
      RunCommand acCmdSelectRecord
      End Sub

      • #1105348

        Hi

        works…ok-ish.. but not as good as when i click the record selector. The vba command sometimes selects the whole line, but sometimes opens up the cell within the selection . any other ideas?

        • #1105349

          perhaps using a continous form will help – trying now…

        • #1105350

          If you don’t want users to be able to edit anything, a list box might be a better solution than a datasheet form.

          • #1105356

            Hi

            yes, was thinking of a list box, but the continous forms with that runcmd is fine.

    Viewing 0 reply threads
    Reply To: VBA for Recordselector.Click (XP)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: