Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Autokeys macro - Not ignoring false conditions

Status
Not open for further replies.

shb46

Programmer
Jul 11, 2001
10
GB
I have created the autokeys macro for the function key F1, which closes the active form after undoing any changes made to the record and opens a Main Menu form.

The macro line below works fine as long as the current object is a form and I would expect this line to be ignored if the current object was not a form as the condition would be false. However, on pressing F1 whilst the active object is a report the line is not ignored and I get an error message, has anyone any idea of where I am going wrong?

Condition: [Screen].[ActiveForm].[Dirty] = true
Action: RunCommand
Command: Undo

Many Thanks
Sue
 
It seems to be working to me. Autokeys overrides any other default function for a key combination or FKey. So when you press F1, it's looking for the [Screen].[ActiveForm] and it's not finding one so it errors out. It can't do anything else because there's no form for it to search.

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top