HELP!-searching access data pages

A

anybody

I am setting an access data page/web page using access 2002. Access does not
provide a default search function for web pages and so after some searching I
found the following website which describes how to set up what I need.
Unfortunantly, it requires working with the code and script editer...with
which I have no knowledge or understanding. The website is

http://msdn.microsoft.com/library/d...c2k2/html/odc_customfilteringandsearching.asp

If you go to the section entitled "Add a Find Button to a Page" you will see
a box with code in it. I am hoping that someone with working knowledge of how
the code works can tell me whether or not is will be possible to copy and
paste that section, and then simply change certains parts or names so that
they refer to my database....Hope the question makes sense. Any help is
greatly appreciated.


Thank You
 
D

Douglas J Steele

Yes, you should be able to copy and paste it, and then make changes to be
consistent with your application.

And pardon me if I seem rude, but wouldn't it have been easier just to try
it, rather than posting this question?
 
A

anybody

apparently i didnt make my question specific enough, for that I apologize.
yes, of course I tried to copy and paste it, but my problem is that I do not
undertsand the programming language enough to know what I then have to change
to make it refer to my own database and tables. For example in the
declaration:

Set rs = MSODSC.DataPages(0).Recordset.Clone

I assume I have to change part of the right hand side to either the name of
my table or field, but I don't which or where. Any help with what exactly I
have to change, and to what, would be greatly appreciated.
 
S

Sylvain Lafontaine

« Clone » is the name of a function of the Recordset object and is not the
name of a field/column. It is possible that the only thing that you will
have to change is « ProductID » in the following line:

rs.find "ProductID=" & cLng(inputbox("Enter a ProductID","Find"))

However, it is a *big* possible.

Finally, I don't want to be rude myself but I don't see how you will be able
to achieve something usefull without first learning the basics.
 
A

anybody

Is learning to program visual basic now considered part of the "basics"??
Does the average access user program with visual basic or does he or she use
the basic design and wizard features. I would think that using these
features, and not learnign a programing language, should be deemed the
"basics". But i am open to hear your reasoning...

As far as my predicament goes-unfortunantly the changes required are not
simply the product id. As such, I remain open to any other help/suggestions.

Thank You
 
S

Sylvain Lafontaine

I don't remember having seen somewhere that « Adding Custom Filtering and
Search Functionality to a Page » was part of the basic design and wizard
features; unless I've totally misunderstood the meaning of the word «
Custom ».

If you want to go beyond the wizard features for DAP, a deep knowledge of
DHTML and Javascript/VBScript is required and even with this knowledge,
programming DAP should be considered at least 5 to 10 times harder than
classic VBA under Access.
 
A

aaron.kempf

VB is the most popular language in the world.

I would reccomend learning it.
 
A

aaron.kempf

I dont know about 5-10 times harder

DAPs are a PITA but they're really really really beautiful
 
W

Weim

Figure this out?

I had to do the same thing recently, problem is, the script you get from
the help menu.....the text has to be exactly the same as to find a match. I
just needed the user to enter in a key word.

So, knowing nothing about VBA, I was able to come up with this from some
varius sites and help.

You will need to change command0 to your button name. Also change the word
"Description" to your colunm name.

<SCRIPT language=vbscript event=onclick for=command0>
<!--
' Clone the recordset.
Dim rs
Set rs = MSODSC.DataPages(0).Recordset.Clone
On error resume next
-->
rs.find "Description Like '%" & CStr(inputbox("Enter a Key Word","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 "Word Not Found",,"Search Done"
Exit Sub
End If
MSODSC.DataPages(0).Recordset.Bookmark = rs.Bookmark
-->
</SCRIPT>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top