Results 1 to 4 of 4
  1. #1
    TreyS is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2019
    Posts
    2

    Link subForm to unbound field in master form


    I have a (sub)form that uses a prameterized query to look up records in a table based on a "Like" string match. It works by itself.

    I would like to include it in a form with a text box to accept the search string, then populate the subForm.

    I created the form, with an unbound text field, and used that as the link to the subForm. As soon as the form is invoked, before it displays, a dialog prompts for the search string. The expected records display in the subForm, but the text field is not populated.

    I think I would like to trigger the subForm with the "On Lost Focus" event of the text field.

    Thanks for any help...

  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
    So where is the search input? Probably issue due to subform loads first so referenced search string is not available to the query, thence the popup prompt.

    Post query SQL statement.
    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
    TreyS is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2019
    Posts
    2

    Thanks. I can live with that

    Quote Originally Posted by June7 View Post
    So where is the search input? Probably issue due to subform loads first so referenced search string is not available to the query, thence the popup prompt.

    Post query SQL statement.
    I guess I'll just call the (sub)form directly and use the popup as the input. This was just a personal utility...

  4. #4
    Minty is offline VIP
    Windows 10 Access 2016
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,157
    As June stated subform loads first, so try having the subform object not set until you have an entry in your text box.
    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 ↓↓

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

Similar Threads

  1. Replies: 5
    Last Post: 03-30-2013, 12:56 PM
  2. Replies: 1
    Last Post: 02-20-2012, 01:59 PM
  3. Link SubForm to UnBound MainForm
    By JonMulder in forum Forms
    Replies: 0
    Last Post: 04-09-2011, 08:43 AM
  4. Link Master Field and Link Child Field
    By evander in forum Forms
    Replies: 2
    Last Post: 05-25-2010, 09:13 PM
  5. Link Master Field Error
    By Lynn in forum Access
    Replies: 6
    Last Post: 04-11-2010, 01:00 PM

Tags for this Thread

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