We help IT Professionals succeed at work.

Access 2003 Keyboard Shortcuts

rwgnovius
rwgnovius asked
on
314 Views
Last Modified: 2013-11-28
I am, once again, finding a hard time seeking a solution by using internet searches :) so i will be very happy if someone has the answer here!

I have a simple form in access 2003, the user wants to be able to use an F key (say F4 or Alt F4 or whatever F key) to change the AllowEdits value from false to true.  That simple...right?? Well I can't figure out how to do it LOL
Please someone help!

Thanks in advance
Comment
Watch Question

Jeffrey CoachmanMIS Liason
CERTIFIED EXPERT
Most Valuable Expert 2012

Commented:
rwgnovius,

Try this:

JeffCoachman
AlloweditsByHotkey.mdb
Jeffrey CoachmanMIS Liason
CERTIFIED EXPERT
Most Valuable Expert 2012

Commented:
rwgnovius,

Have you given it any thought on how to reset the Allow Edits property?

JeffCoachman

Author

Commented:
Actually, I have a button on the form that toggles from EDIT to CANCEL, the user wants the hot key to be F4 for both, the button programming itself achieves this simply with an
if AllowEdits = true then
allowedits = false
else
allowedits = true
end if
statement.
My problem is getting the command button code to activate when the F4 button is pressed. Your attached mdb works great but I can't figure out how to actually assign the F4 key to the Macro...what are the steps?
Thanks for the help
Mike EghtebasDatabase and Application Developer

Commented:
boag2000,

Could you please add some explanation what to look for after downloading your sample? What key you have used to do what action and how it works.

Thanks

Mike
Jeffrey CoachmanMIS Liason
CERTIFIED EXPERT
Most Valuable Expert 2012

Commented:
Mike,

Sorry about that.
:-O

I had this sample hanging around, I just posted it to see if it was what the asker was after.

I'll start from the top.
In order to use a "Hotkey" (Function Key) you must create an AutoKeys Macro.
This is a macro (or macro group) that loads when you open the database.

So if you open the database you will see my little Autokeys macro.
It uses the SetValue command to set the AllowEdits property of the Form to Yes.

So, ...
You open the DB.
The AutoKeys Macro activates. (behind the scenes)
You open the form.
Notice you cannot edit any fields, because the AllowEdits Property is set to No by default.
Now if you press the F4 Function key, the Allow Edits property will be set to yes, allowing you to edit the data an on form.

JeffCoachman
MIS Liason
CERTIFIED EXPERT
Most Valuable Expert 2012
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Mike EghtebasDatabase and Application Developer

Commented:
boag2000,

re:> Now if you press the F4 Function key, the Allow Edits property will be set to yes.

Yes it does.

Is it possible to set the  Edits property to No with a second F4?

Also, is it possible to include F1, F2, Etc. each perform some other actions (like bringing up a popup form, etc.)?

I seldom use macros but I think I need to pay attention to macros as well because using KeyPress (with KeyPreview set to yes) function keys do not produce Ascii values unlike the other key or key combinations.

I could add a seperate question for you to post your answer if you have some solution for the above mentioned questions.

Thnks,

Mike
Mike EghtebasDatabase and Application Developer

Commented:
In a macro:
{F4}    if Froms!MyForm.Edits property = True  Then
            Froms!MyForm.Edits property = False
           Else
           Froms!MyForm.Edits property = True
           End If

{F1}  If  Froms!MyFormInput.Open= True Then
          Froms!MyFormInput.Close
          Else
          Froms!MyFormInput.Open
          End If

How to include the above air codes in to the auto macro using your sample mdb file?

Mike

Jeffrey CoachmanMIS Liason
CERTIFIED EXPERT
Most Valuable Expert 2012

Commented:
eghtebas,

I submitted a new sample:
 (http://filedb.experts-exchange.com/incoming/2008/07_w29/41020/AlloweditsByHotkey.mdb)
That used the original code to do the toggle-ing.


Access-EEQ23561538ToggleFormAllo.mdb
Mike EghtebasDatabase and Application Developer

Commented:
Jrff,

Thank you for the reponse. I guess, I will be looking and testing it over the upcoming weekend or possibly at work during the week.

Thanks,

Mike
Mike EghtebasDatabase and Application Developer

Commented:
I meant to write Jeff. Sorry about that.
Jeffrey CoachmanMIS Liason
CERTIFIED EXPERT
Most Valuable Expert 2012

Commented:
Mike EghtebasDatabase and Application Developer

Commented:
Thank you.

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.