Small OpenForm Issue

jamiesuperman420

Registered User.
Local time
Today, 02:33
Joined
Nov 20, 2008
Messages
43
Hello there!! I have a form (SearchCode) that's used to search for a "Code" that's chosen from a combo box. When you hit the "Search" button it opens the proper form (Central) and displays the corresponding
Code:
 which works perfectly fine(!!) - HOWEVER, it also automatically filters it so that it's the only record (out of the 900-some).
 
Is there a way to stop the filter from being added - like better code??  The original form is already filtered by [Company]<>""
 
Thanks for any help!!
 
I should add: I THINK Find is a little tough to use because you can't "GetFocus" on what I'm trying to search (in an effort to prevent people from changing the information).

I want it to open all the records, I just want it to goto the one with the matching
Code:
.  I hope this all makes sense and helps you help me ;)
 
This type of thing is one way:

Code:
  Dim rs            As Object
  Dim lngBookmark   As Long

  'set a variable to the current record
  lngBookmark = Me.txtEmpID

  'open the new form
  DoCmd.OpenForm "frmEmployeesDetail"

  'take it to the selected record
  Set rs = Forms!frmEmployeesDetail.RecordsetClone
  rs.FindFirst "EmpID = " & lngBookmark
  Forms!frmEmployeesDetail.Bookmark = rs.Bookmark

  Set rs = Nothing
 
How could I not help Superman? :p
 

Users who are viewing this thread

Back
Top Bottom