Results 1 to 6 of 6
  1. #1
    shabbaranks is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Oct 2011
    Posts
    162

    Trying to reference a value in a subform with a query

    Hi guys,



    I've forgotten how to reference a value which is in a subform, Im currently using the QBE and the criteria is tha current value in the subform which I wish to copy (but initially I am just trying to select it). Can someone remind me how to reference a value in a subform from a main form or from the QBE?

    Thanks!

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922

  3. #3
    shabbaranks is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Oct 2011
    Posts
    162
    Thanks I was looking at that prior to posting my question, but Im not understanding it hence the post - dont suppose you could elaborate?

    As I understand it if I have a record on a subform I should query using (and this would be from the main form)

    Me.subformname.form.subformref.value

    so the subformname is the name in the property sheet of the form and the subformref is the name of the location holding the data (do you call this a recordset?)

    Aplogies for my technique of referencing as I say this is the part which I need to brush up on. Thanks again

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Are you going to use a Query or simply reference the SubForm from the MainForm?

  5. #5
    shabbaranks is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Oct 2011
    Posts
    162
    Actually Ive just thought, potentially the value within the subform could have multiple different values. What Im trying to achieve is emulate a copy and paste situation whereby a user would click a button and that would copy the last record in a subform into a new record within that same subform - any ideas?

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Sorry, none at all.

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

Similar Threads

  1. Replies: 6
    Last Post: 12-19-2013, 12:34 AM
  2. Query reference to a subform
    By hawkins in forum Forms
    Replies: 3
    Last Post: 08-05-2011, 10:49 AM
  3. Replies: 1
    Last Post: 05-12-2011, 02:25 PM
  4. Creating a reference to the subform.
    By evander in forum Forms
    Replies: 2
    Last Post: 05-26-2010, 09:39 AM
  5. Can't reference control in subform
    By evanscamman in forum Forms
    Replies: 0
    Last Post: 12-25-2007, 06:47 PM

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