Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

search access database

Discussion in 'Information Technology' started by zwasdl@gmail.com, Jul 28, 2006.

  1. zwasdl@gmail.com

    zwasdl@gmail.com
    Expand Collapse
    Guest

    How do I search an access database to find all the queries containing
    certain word, say "cost"

    Thanks a lot,

    Wei
     
  2. Loading...

    Similar Threads Forum Date
    Sikh News Indian American Couple Donates For Sikh, Punjabi Culture Research In US Breaking News Aug 19, 2016
    Soul Search By Swarn Singh Bains Book Reviews & Editorials May 25, 2016
    Harpal Singh Kumar Cancer Researcher Knighted By Queen Elizabeth II Sikh Personalities Jan 5, 2016
    Movies Ashdoc's Movie Review---dozakh In Search Of Heaven ( 2015 ) Theatre, Movies & Cinema Apr 6, 2015
    Research Shows NFL Quarterbacks Play Better With Beards Business, Lifestyle & Leisure Nov 23, 2014

  3. Pat Hartman\(MVP\)

    Pat Hartman\(MVP\)
    Expand Collapse
    Guest

    There is no built in facility that supports this. You'll need a third party
    tool. You can purchase speed ferret or search for freeware/shareware
    options.

    <zwasdl@gmail.com> wrote in message
    news:1149879353.555271.81790@i40g2000cwc.googlegroups.com...
    > How do I search an access database to find all the queries containing
    > certain word, say "cost"
    >
    > Thanks a lot,
    >
    > Wei
    >
     
  4. John Vinson

    John Vinson
    Expand Collapse
    Guest

  5. Jamie Collins

    Jamie Collins
    Expand Collapse
    Guest

    zwasdl@gmail.com wrote:
    > How do I search an access database to find all the queries containing
    > certain word, say "cost"


    An 'Access query' can be either a Jet VIEW or a Jet PROCEDURE. You can
    filter their respective definitions using your search word:

    Sub SearchQueries()

    Dim con
    Set con = CreateObject("ADODB.Connection")
    With con
    .CursorLocation = 3
    .Open _
    "Provider=Microsoft.Jet.OLEDB.4.0;" & _
    "Data source=C:\MyDB.mdb"

    Dim rs
    Dim row
    Dim colNames

    Set rs = .OpenSchema(23) ' VIEWs
    rs.Filter = "VIEW_DEFINITION LIKE '%cost%'"
    For row = 0 To rs.RecordCount - 1
    colNames = colNames & _
    rs.Fields("TABLE_NAME").Value & vbCr
    rs.MoveNext
    Next

    Set rs = .OpenSchema(16) ' PROCEDUREs
    rs.Filter = "PROCEDURE_DEFINITION LIKE '%cost%'"
    For row = 0 To rs.RecordCount - 1
    colNames = colNames & _
    rs.Fields("PROCEDURE_NAME").Value & vbCr
    rs.MoveNext
    Next

    MsgBox colNames

    .Close
    End With

    End Sub

    Jamie.

    --
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page