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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem referencing a sub-form with AutoKeys

Status
Not open for further replies.

Ricky1946

Programmer
Jul 11, 2001
76
GB
I feel rather silly as I am sure that I have carried out this task before.
I am trying to create an Autokey that will reference the controls in a sub-form. E.g. ^n to move to the next record in the Sub-Form and not its parent form. Even when the sub-form has the focus it still carries out the task in the main form. When I try to 'point' the macro, (or create a new one to point) to the sub form it tells me that the sub-form is not open although it is.
I have tried a number of times using the full path to the sub-form but it still tells me that the sub-form is not open.
I would appreciate an answer to this, but I also wonder if there is VB coding that could do the shortcut keys better than the rather laborious AutoKeys facility.
I have to deliver this databse in a few hours so a quick response would be very much appreciated.
Thanks
Ian "To say 'thankyou' encourages others."
 
You haven't shown us how you're referencing the subform, so it's hard to know what needs to be changed. Here's the generic way:

forms!NameOfMainForm!NameOfControlThatHoldsTheSubform.form

And depending on what you're trying to do, this may or may not be of any help, but we can't tell unless you post the code.

Post back with the code and you'll get more answers. If the code is all in the macro, convert the macro to code and then post that.

Jeremy ==
Jeremy Wallace
AlphaBet City Dataworks
Affordable Development, Professionally Done

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top