Hi Kent, I'm not sure what the actual problem is (I would guess that you need to build up a string of the command you want assigned to the hotkey and then use macro substitution to put it in effect) , but it would be much safer to program this in the KeyPress() of the form (of course assuming you are using VFP and that there is a form active).
Frank. Frank Cazabon On 06/07/2012 03:09 PM, Kent Belan wrote: > Hello, > > I am trying to build a custom menu with use defined hotkeys. > > So I have a cursor with the menu options and the a hotkey number, and report > number > > The first report is assigned F4, second F5 and so on. This is done be the > end user. > > I loop thru the cursor and am trying to assign the hotkeys, but having > trouble > > Select hotkeys > Scan > lcHotkey = 'F' + ltrim(str(hotkeys.keynum,2)) > > on key label (lcHotKey) thisform.RunReport(hotkeys.reportnum) > > Endscan > > The problem is when F4 is hit it gives and error "reportnum not found" > > If I put the correct report number it works fine: > On key label (lcHotkey) thisform.RunReport(13) && This works fine > > Any ideas on how I can get the on key label command to work with the > variable ? > > Thanks, > Kent > > [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[email protected] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

