File Search

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Good Morning all!

Forgive my ignorance but I am in need of your expertise once again! Here is
the back story... I have a database that is tracking Credits being processed.
I have a form that we enter the data into and a form that others can only
search in. Here is my dilema... I need a way to have a search box pop up when
someone clicks it that will allow them to search for a file that is in our
shared files. Where would I even begin to accomplish this? The reason I need
this is because we have Credit Return Notices that we send out to the
customer and I want to be able to do a search for them all in one place. I
hope this makes sense! Thank you!
 
Hi,
you could use the api found here:
http://www.mvps.org/access/api/api0001.htm
This would bring up the default open/save dialog. You could set its initial
directory and use the returned path for whatever you want to do.
You could also use the Dir() Function with wildcards to search a hardcoded
path if you wanted.
HTH
Good luck
 
Wow that is a lot of 'stuff' to wrap my brain around... I am so new to VB
it's not even funny! Is there anyway someone would have the time to talk me
through it step by step?

I need to open a search box that will search "S:\CNB\08 Billing\08-07
Customer Credits/E-CreditRequestFormsComplete" for the credit number that is
entered in the search box within the title of the file we are searching
for... I hope this all makes sense! Please let me know if you need anything
from me... :) I so appreciate the help!
 
Sub Search_AfterUpdate()
Const StartIn = "S:\CNB\08 Billing\08-07 Customer
Credits/E-CreditRequestFormsComplete"
Const FileExt = ".doc"
Me.Search.Value = Dir(StartIn & "*" & Me.Search.Value & "*" & FileExt)
'Will return the First FileName matching the search Criteria & overwrite
it
'You'd probably return / use it elsewhere though
End Sub

HTH

Pieter
 
It comes up with 'File Not Found' when I punch in data that I KNOW is in that
folder... Hmmmm... Any suggestions? You help is so appreciated! Thank You!
 
oops, forgot the trailing slash & changing / to \

Const StartIn = "S:\CNB\08 Billing\08-07 Customer
Credits\E-CreditRequestFormsComplete\"

SAT

Pieter
 
I am thinking that VB just does not like me...

I have a 'Compile Error: Method or data member not found' coming up and it
highlights the .Search when I hit 'OK'... Do you know what this means? Thank
you so much for your help...
 
that must be replaced with the name of the control you want to return the
value to, click the builder icon of the textbox after update event (AL+Enter
to bring up the properties Page, Event Tab, After Update - select Event
Procedure from (...))
change "Search" to the actual Name of the control
If Text1 is the name you should get:

Private Sub Text1_AfterUpdate()

End Sub

Hope I'm as clear as mud

Pieter
 

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

Back
Top