|
-
Apr 12th, 2000, 01:37 AM
#1
Thread Starter
Lively Member
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
-
Apr 12th, 2000, 02:49 AM
#2
Frenzied Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|