Paste into Find window using a macro operation

  • Thread starter Thread starter Jim
  • Start date Start date
J

Jim

I am trying to create a macro which as one of its commands will paste
copied information from an earlier command into the Find What field of
a Find window which was opened in an command just prior to the paste
command. However, that operation or command returns the following
message: "The command or action Paste isn't available now." Through
experimentation I have found that the Find window opens and the cursor
is blinking in the Find What field, but the paste action won't happen
in this field. There is some evidence that the paste action tries to
happen back in the field of the table I'm attempting the search in, but
that is not conclusive. However, at the point where the Find window
opens I can manually paste using CTRL+V in the Find What field. I of
course want this to happen automatically via the macro command but need
help in figuring out how to accomplish this. If you have any
suggestions please send them along.

Jim
 
I'm sorry, I now realize that the above is not what I need to do. What
I need to do is to have the macro open a query in design view, then
paste the copied information into the criteria area of a certain field.
I will need help in doing that, so if you have any suggestions on
that.......

Thanks,

Jim
 
You have other less complicated options if you want to pass a criteria to a
saved query. Did you try adding a parameter to the query? In Criteria field,
enter some prompt, in brackets, like [Enter Criteria:]. when you execute the
query, manually or through VBA code or macro, a prompt will pop up and then
you can type or paste desired parameter value.
 
Thanks for that info. However, I still desire to paste into the
criteria propery of a specific field in the query design view. I'm
close except for getting to the criteria property area to paste.
There's no GoToProperty type of command.

Jim
 

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