Command button behaviour

Ask a Question related to Microsoft Access, Design and Development.

  1. #1

    Default Command button behaviour

    Hi,

    I have a form & subform which contains a command button on the subform.
    After running some code, the command button is supposed to return the focus
    to a control on the main form using either the .setfocus method or
    docmd.gotocontrol ( I have tried both.)

    It works fine when you click on the button. However, if you invoke the
    button using the keyboard ALT+A (button caption = "&Add") the rest of the
    code works but the button does not release the focus to the mainform
    control.

    Any ideas what I am doing wrong?

    Thanks for any help,

    Jim F.


    Jim Franklin Guest

  2. Similar Questions and Discussions

    1. Using Command Behaviour and SQL2000
      I am using the command behaviour in dream weaver mx 2004 to insert data into a table using a stored procedure. It is inserting the data...
    2. DWMX2004 Crashes when using command behaviour
      I am trying to use the command behaviour but when i fill it out and attempt to run it crashes? Any idea why?
    3. Strange button behaviour
      Hello, I created an ASPX page with some buttons on it, but one of them is reacting in a strange way : In design mode, if i double click on it,...
    4. Behaviour 4 a 'sumbit' button
      I need to create a behaviour labelled: a. "Submit" The submit behaviour takes input from three input fields labelled 'username', 'password' and...
    5. Behaviour 4 a 'clear' button
      I need to add a behaviour for a clear button as follows: b. "Clear" The clear behaviour removes data typed into the three input fields (username,...
  3. #2

    Default Re: Command button behaviour

    I just tried it in Access XP and got the same thing you did. Unless someone has some more
    information on this, it sounds like a bug to me.

    --
    Wayne Morgan
    Microsoft Access MVP


    "Jim Franklin" <james.franklin@ntlworld.com> wrote in message
    news:bdCPa.657$DN5.58437@newsfep1-win.server.ntli.net...
    > Hi,
    >
    > I have a form & subform which contains a command button on the subform.
    > After running some code, the command button is supposed to return the focus
    > to a control on the main form using either the .setfocus method or
    > docmd.gotocontrol ( I have tried both.)
    >
    > It works fine when you click on the button. However, if you invoke the
    > button using the keyboard ALT+A (button caption = "&Add") the rest of the
    > code works but the button does not release the focus to the mainform
    > control.

    Wayne Morgan Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139