Consulting

Results 1 to 4 of 4

Thread: Pass specific Data From One Form to Another with a double click

  1. #1
    VBAX Regular
    Joined
    Jun 2020
    Posts
    15
    Location

    Pass specific Data From One Form to Another with a double click

    Hi,

    I would like to write a VBA code that could with double-click copy value from selected field in a form to another form.

    For example, in the PopUp form named “frmGLO” in column “Refer2” I would like that double-click would copy value ("AR2A") to another opened form EntryHead in the field “Refer1”

    Please see the picture below.

    How can i make that?


    ReferCopy.jpg

  2. #2
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,197
    Location
    In the form frmGLO's field Refer2 Double-Click Event Procedure put in

    Forms![AR2A]![Refer1] = me.refer2
    Assuming both forms are open.

    ps I haven't tested the syntax, it is from memory.

  3. #3
    VBAX Regular
    Joined
    Jun 2020
    Posts
    15
    Location
    Thanks for the response-

    I want it to pull up the specific value in a line where I am double clicking on.

    In this case, I click on row 3 and column "Refer2" where is the value A32A selected. And I would like that value to be passeed in Entryhead form into textbox Reref1?
    Similarly, if I clicked the fourth line, column "Refer2", the value of R123 would be transferred...

  4. #4
    VBAX Regular
    Joined
    Jun 2020
    Posts
    15
    Location
    I have somehow managed this by that link: https://www.access-programmers.co.uk...p-form.297062/


    This is the final code. So on the far left row on pop-up form just double click and value is pasted to other form!


    Private Sub Form_DblClick(Cancel As Integer)

    Forms!EntryHead!Refer1 = Me.Refer2

    End Sub

Posting Permissions

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