Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004
    Location
    London
    Posts
    76

    Unanswered: using find and replace window to search values

    Hi,

    I have a command that opens the find and replace window, by default the 'Look in' box is the active control, therefore if I click on the 'Company Name' box the find and replace will search in this field. However, I have the option to replace the active control in the 'Look in' box for the form name which then allows the user to search in all the controls in the form. I want to be able to have the form name as the default at all times regardless of which control is active in the find and replace window allowing the user to find and replace in all fields on this form, how can this be achieved?...I have placed the vbcode for the command below...

    Private Sub cmdsearchIndex_Click()
    On Error GoTo Err_cmdsearchIndex_Click


    Screen.PreviousControl.SetFocus
    DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70

    Exit_cmdsearchIndex_Click:
    Exit Sub

    Err_cmdsearchIndex_Click:
    MsgBox Err.Description
    Resume Exit_cmdsearchIndex_Click

    End Sub

    Thanks,

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    try me.form.setfocus
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Feb 2004
    Location
    London
    Posts
    76
    this does not seem to work as the control can change in the find and replace window also when entering a search criteria it comes back with nothing when I know that word exists...Thanks anyway

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •