Hi experts, I would be greatfull for some advice on my problem.......
So, I have Data access page which have command butons for searching through recordset, one command button is searching column with text datatype, and other button should search through column with currency datatype.
The problem is that I dont know how to write the code for ONCLICK action for button that should search currency dataype.......
The code for ONCLICK action for button that is searching column with text datatype is:
so if someone knows what part of this code should be changed so I could search currency datatype column,
anykind of comment is very appriciated..
So, I have Data access page which have command butons for searching through recordset, one command button is searching column with text datatype, and other button should search through column with currency datatype.
The problem is that I dont know how to write the code for ONCLICK action for button that should search currency dataype.......
The code for ONCLICK action for button that is searching column with text datatype is:
Code:
<SCRIPT language=vbscript event=onclick for=Command6>
<!--
Dim rs
Set rs = MSODSC.DataPages(0).Recordset.Clone
On error resume next
' This line assumes that the value you are filtering on is text.
' If the search value is an ineteger, use slightly different syntax.
' For example, "CustomerCode=" & cLng(inputbox("Enter a CustomerCode","Find"))
rs.find "Customer='" & CStr(InputBox("Please enter value", "Find")) & "'"
' Custom error handling.
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 "Customer not found",,"Search Done"
Exit Sub
End If
MSODSC.DataPages(0).Recordset.Bookmark = rs.Bookmark
-->
</SCRIPT>
<SCRIPT language=vbscript event=Current(oEventInfo) for=MSODSC>
-->
</SCRIPT>
so if someone knows what part of this code should be changed so I could search currency datatype column,
anykind of comment is very appriciated..
Last edited: