Results 1 to 5 of 5
  1. #1
    tuniwes is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Nov 2015
    Posts
    43

    Passing a value from a form into the current field on an open form


    I'm struggling on achieving this
    I have a sub-form open and want to double click on a field(datasheet view) to open another form of bitmap images.....no problem in doing that

    Then depending on the image clicked on the second form I want to pass a text value back to the field on the original form.

    Currently going around in circles, any help would be much appreciated

    Thanks

    Ian

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    More than one way to accomplish. What have you tried? Post code.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    tuniwes is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Nov 2015
    Posts
    43
    Hi June

    I have a form called inspection_form that is a subform in datasheet view with a field called feature

    On the dbl click event of the value field I am opening the form that contains the bitmap images called bitmaps

    On the dbl click event for a bitmap I tried

    Option Compare Database


    Private Sub Command7_Click()
    Forms![inspection_form]![feature] = "test"
    End Sub

    Access reported an error couldn't find the referenced form inspection_form


    Thanks

  4. #4
    Minty is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,157
    That's because it is a sub form. You need to reference it as per http://access.mvps.org/access/forms/frm0031.htm

    Forms!Mainform!Subform1.Form!ControlName
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  5. #5
    tuniwes is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Nov 2015
    Posts
    43
    Guys,

    As always, fantastic the way you help those of us who are struggling.
    Working fine now thanks so much for your help!

    I will mark as solved

    Best

    Ian

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 7
    Last Post: 10-13-2016, 12:32 PM
  2. Replies: 5
    Last Post: 09-16-2016, 03:16 PM
  3. Replies: 10
    Last Post: 10-14-2013, 10:18 AM
  4. Replies: 3
    Last Post: 08-18-2012, 03:21 PM
  5. Passing current form name to other form
    By owiec in forum Forms
    Replies: 2
    Last Post: 11-15-2009, 05:50 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums