Results 1 to 3 of 3
  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

    I have had this code working on a form as a search box
    Private Sub SearchBox_AfterUpdate()
    Me.Requery
    End Sub

    Private Sub btnClear_Click()
    Me.SearchBox.Value = ""
    Me.Requery
    End Sub
    and the forms ID criteria
    Like [Forms]![frmAddEmployee].[SearchBox]


    all usual stuff
    but I am trying to consolidate my forms into one form with tabs,
    I have placed frmEmployee into one tabbed page (not in a Master Child arrangement)
    now when opening the form a parameter query appears asking for the SearchBox
    I thought maybe I could have a modal form open from a search button in the form
    but the code
    DoCmd.OpenForm "frmEmployee", , , "FieldName = #" & Me.cboSearch & "#"
    opens a second copy of the form (at the right record)(but not in the tabbed page of course)
    any clues on modifying this to update the form with the selected record

  2. #2
    DarrenUD is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    22
    Hi libraccess, I am not an expert but you can try this for your forms ID criteria [Forms]![Your Main Form Name]![frmAddEmployee].[From].[Controls]![SearchBox]

  3. #3
    libraccess's Avatar
    libraccess is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2012
    Location
    Napier New Zealand
    Posts
    129
    No it seems like any criteria in this arrangement is called on when openinig the main form . thanks anyway

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

Similar Threads

  1. Replies: 3
    Last Post: 08-22-2012, 03:28 AM
  2. Replies: 7
    Last Post: 08-08-2012, 03:28 PM
  3. Replies: 5
    Last Post: 07-13-2012, 01:15 AM
  4. Replies: 12
    Last Post: 03-22-2012, 02:48 AM
  5. Replies: 2
    Last Post: 08-31-2010, 08:57 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