This first line is the line that has a problem and the following after the big gap is the whole thing.
MySet.FindFirst Criteria ' Locate first occurrence.
Expand|Select|Wrap|Line Numbers
- Option Compare Database 'Use database order for string comparisons
- Private Sub Form_BeforeUpdate(Cancel As Integer)
- ' Me![Updated] = Now
- End Sub
- Private Sub SelectCompany_AfterUpdate()
- Dim Criteria As String, MyDB As Database, MySet As Recordset
- Criteria = "[Company] = " & "'" & Forms![Customers]![SelectCompany] & "'"
- Set MyDB = DBEngine.Workspaces(0).Databases(0)
- Set MySet = Forms![Customers].RecordsetClone
- MySet.FindFirst Criteria ' Locate first occurrence.
- Me.Bookmark = MySet.Bookmark
- Me![Company].SetFocus
- Me![SelectCompany] = Null
- End Sub