Variable field and a pop up box

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

Guest

I am new at Access but I have been working with Lotus Approach Database for
sometime.
I have multiple clients defined in a field. I would like to create a pop up
box that appears when entering the F5 button on the keyboard. The pop up box
would present with a variable field that lists the different clients. Once a
client is selected in this variable field, a querry is called using a macro
button on the popup box that would run a predefined querry to include the
selected client. Can someone assist me with this task.
 
Try putting your pop up and associated code in the keyascii event.
Not sure if F5 is one of those that has an ascii equivilent, but if it
is, then this will work.
 
Sorry, should have been more detailed. In the forms "Key Down" event,
put in the code:

If KeyCode = 116 then 'that is the keycode for F5

put in code that you want to happen

End If

Make sure the key preview is set to yes for the form also...

B
 
Thank you very much for this response. I was hoping you could assist me with
the code. Is that possible?
 
You don't need any code to open a pop-up form from the keyboard.

Just create a new Macro called AutoKeys (Access will recognize this as
a special Macro). In the Macro Name column enter {F5} (including the
curly brackets) and in the Action column choose OpenForm. In the Form
Name field at the bottom choose the name of your pop-up form. Save and
close the Macro. Now, whenever you press F5 on the keyboard the pop up
form will be displayed.

HTH

Peter Hibbs.
 
Hi,

I get the impression you're thinking of how you'd tackle the problem
using Approach. Access has a different range of tools with their own
strengths and weaknesses, and possibly all you need to do is one of the
following:

1) If the query you want to "call" is a Select query to display the data
for the selected client,
(a) display your form in design view and make sure the magic wand button
on the toolbox is depressed.
(b) add a combobox to the form and, in the combo box wizard, select
"Find a record on my form based on the value I selected in my combo
box."

or
(2) If you want to execute an action query, create a combobox as a bove
but select "I want the combo box to look up the values...". Then turn
the query into a parameter query that gets the client name or ID from
the
 
Hi

Why run a predefined query -

Simply call another popup form using the ID of the selected client.
 
Back
Top