Creating Macro for Control F function

librag

New member
Local time
Today, 15:37
Joined
Mar 29, 2011
Messages
8
Any idea how to create Macro for Control F function - My Find Button thru the wizard isnt working, so this would be a work around!

Help

Gini :)
 
I wouldn't use Ctrl + F as it does have a system use but ALT+F is keyascii 102.

However, there seems far more to this than your posting says. What are you trying to find, where is it locatated and how do you enter this 'find' parameter? Once we know this then we can decide the best way.
 
I am using the Find Button on a Form - to find particular Company Name (i.e. Mailing List is available for 300 companies, of which only 10-15 companies gets daily emails, to look thru all 300 companies by scroll the option is too manual, hence I want to create the Find key so the reps can type in partial name of the company with * at the end and let Access do its magic!)

Problem 1 - For some reason the Find button thru the wizard doesnt work for some reason!!! Unsure why
Problem 2 - After creating the Module as follow and connecting it with Runcode - Find_It, Error comes up as "A Problem ocurred while Microsoft Access was commnunicating with teh OLE server or ActivexControl.

Option Compare Database
Option Explicit


Public Function Find_It()


SendKeys "^f", True


End Function

Hope this clairfies....sorry for the delay in getting back....your help is appreciated! :)

Gini

 
Have you tried using the code

Code:
    Dim str As String
    str = InputBox("What Company are you searching for?", "Company")
    str = "*" & str & "*"
    
    DoCmd.FindRecord str, , True, , True
 
Last edited:
Pardon my ignorance....should I create the code under the button on the form - under event procedure?
 
Sounds like a plan. "Ignorance?" Never. This forum is here to help and sometimes we all miss the obvious, like I did yesterday in another post.
 
Hi

Thanks for your response. I am dealing with a bigger issue now so kind of got side tracked with that! Sorry for the delay in getting back.

The Find function is still not working but will tackle that once i get the other stuff done...thanks again.

Gini
 

Users who are viewing this thread

Back
Top Bottom