Results 1 to 2 of 2
  1. #1
    libraccess's Avatar
    libraccess is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2012
    Location
    Napier New Zealand
    Posts
    129

    Search Box on subfrm

    Hi have a search box on a subform (looking for Assets by an Asset ID no)
    SELECT tblAsset.IDAsset, tblAsset.A_Co_Code, tblLocation.Location
    FROM tblLocation INNER JOIN tblAsset ON tblLocation.IDLocation = tblAsset.LocationFK;
    This returns all the assets by their ID (A_Co_Code)
    The subfrm also has the criteria below.
    Like [Forms]![frmLocation]![subfrmAsset].[Form]![SearchAsset] & "*"

    So the results all show in the query (and in the combo box [SearchAsset] but of course the search only opens the subfrm on the correct page if the Location which is in the main form is correct at the time of the search ie the asset i search for is at the location that is open
    So prefer A but would go with B
    A:It would be good to goto the Form and subfrm as selected
    Br do not show other locations assets in the query
    Thanks

  2. #2
    libraccess's Avatar
    libraccess is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2012
    Location
    Napier New Zealand
    Posts
    129
    So B: I looked at the row source query again and realised I had not referenced [Location] correctly

    [Forms]![frmlocation]![Location] so this works
    but if anyone can think of a way to search all Forms subforms that would be nice

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

Similar Threads

  1. Replies: 3
    Last Post: 09-02-2013, 04:33 PM
  2. Replies: 2
    Last Post: 04-17-2013, 02:12 PM
  3. Replies: 7
    Last Post: 08-08-2012, 03:28 PM
  4. Replies: 5
    Last Post: 07-13-2012, 01:15 AM
  5. Set Focus to subfrm on Tabbed Page
    By libraccess in forum Forms
    Replies: 3
    Last Post: 06-30-2012, 07:44 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