DAP Error 3001:

krberube

just beyond new
Local time
Today, 16:44
Joined
Jan 14, 2005
Messages
142
Hi all,
I have a DAP off of a table, that i added a search button to (code from microsoft, see below) This works fine for the 1st DAP i did.

<SCRIPT language=vbscript event=onclick for=search>
<!--

'Clone the recordset.

Dim rs
Set rs = MSODSC.DataPages(0).Recordset.Clone
On error resume next

' rs.find "TLAUnit" & cLng(inputbox("Enter SN","Find"))
rs.find "TLAUnit='" & CStr(InputBox("Enter Unit S/N", "Find")) & "'"

If (err.number <> 0) Then
Msgbox "Error: " & err.number & " " & err.Description, , "Invalid Search"
Exit Sub
End If
'Check search results for Success.
If (rs.bof) or (rs.eof) then
Msgbox "No SN found",,"Search Done"
Exit Sub
End if
MSODSC.DataPages(0).Recordset.Bookmark = rs.Bookmark
-->

I created a 2nd DAP off of another table and added the same code, replaceing "TLAUnit" with "SLA front"

When i enter search criteria for this 2nd DAP I get an error:

ERROR 3001:Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

Any Ideas?
Kevin
 
I found the problem (unsure why though)
line: rs.find "TLAUnit='" & CStr(InputBox("Enter Unit S/N", "Find")) & "'"

needed to have "TLAUnit='" be:

rs.find "[TLAUnit]='" & CStr(InputBox("Enter Unit S/N", "Find")) & "'"

not sure why though, I have 3 other DAP's that used the original line and all 3 worked fine.
 
krberube said:
I found the problem (unsure why though)
line: rs.find "TLAUnit='" & CStr(InputBox("Enter Unit S/N", "Find")) & "'"

needed to have "TLAUnit='" be:

rs.find "[TLAUnit]='" & CStr(InputBox("Enter Unit S/N", "Find")) & "'"

not sure why though, I have 3 other DAP's that used the original line and all 3 worked fine.

thx for posting how you solved this problem krberube! :rolleyes:
I had the same problem like U ,which is now resolved using solution you provided.:)
 

Users who are viewing this thread

Back
Top Bottom