Results 1 to 2 of 2

Thread: I need help - Why doesn't this search work?

  1. #1

    Thread Starter
    Lively Member brjames's Avatar
    Join Date
    Jan 2000
    Location
    Tenby, Wales, UK
    Posts
    121
    Can anyone tell me why this search won't work?
    When run I get an error message saying OPERATION IS NOT SUPPORTED FOR THIS TYPE OF OBJECT.

    It is searchg for a mooring number in a harbour management project I'm working on. The form tht it is on has information from two different tables displayed on it in text boxes. It has two data controls.

    I would be grateful for any help

    Cheers!

    Code:Private Sub cmdFind_Click()
    prompt$ = "Enter the full Mooring Number e.g 001 "

    SearchStr$ = InputBox(prompt$, "Mooring Search")
    Data2.Recordset.Index = "Mooring Number"
    Data2.Recordset.Seek "=", SearchStr$
    If Data2.Recordset.NoMatch Then
    Data2.Recordset.MoveFirst
    End If
    End Sub

  2. #2
    Frenzied Member
    Join Date
    Aug 1999
    Location
    Santa Clara, Ca , 95058
    Posts
    1,105
    If mooring number is supposed to be numeric, try:

    Data2.Recordset.Seek "=", Val(SearchStr$)

    Then visit Marty's answer in the General Section.

    http://forums.vb-world.net/showthrea...threadid=13956

    [Edited by JHausmann on 04-12-2000 at 03:59 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
  •  



Click Here to Expand Forum to Full Width