Results 1 to 2 of 2
  1. #1
    Wayne311 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    91

    Search in subform

    I have a form (a receipt) that has a subform. The form is a 1 relationsip with the subfom being a many relationship. I want to search with an user input text box called SearchCaseNumberText. I want it to search all receipts and return the form and subform to the proper receipt. The following code only searches the current subform, not all receipts. How can I get it to search all?

    Function SearchCaseNumber()
    On Error GoTo SearchCaseNumber_Err
    With CodeContextObject
    DoCmd.GoToControl "CRNumber"
    DoCmd.FindRecord .SearchCaseNumbertext, acEntire, False, , False, acCurrent, True
    End With

    SearchCaseNumber_Exit:


    Exit Function
    SearchCaseNumber_Err:
    MsgBox Error$
    Resume SearchCaseNumber_Exit
    End Function

    Thanks
    Wayne

  2. #2
    msasan1367 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Feb 2013
    Posts
    60
    I make mistake and post in wrong place

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

Similar Threads

  1. Write Code to Navigate from Subform to Subform
    By Swilliams987 in forum Programming
    Replies: 22
    Last Post: 02-04-2011, 11:30 AM
  2. Replies: 2
    Last Post: 08-31-2010, 08:57 PM
  3. Create combo search form in subform
    By grant.smalley in forum Forms
    Replies: 6
    Last Post: 02-19-2010, 04:37 AM
  4. Replies: 4
    Last Post: 01-11-2010, 11:41 PM
  5. Replies: 1
    Last Post: 03-28-2007, 09:18 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