Does this only occur when using the button wizard? What happens if you add a button to a form without using the wizard, and then try to resize it?
You said in your original post that you are attempting to learn how to use Access.
Most of us who have experience in developing database applications in Access don't use the wizards, and I'd recommend that you try the same.
You'll understand a lot more about the nuts and bolts of Access as a development environment if you do things yourself rather than allowing a wizard to do the work for you.
The wizards these days use macros, whereas most experienced developers use VBA code, which I'd recommend.
Start with something simple. Let's say you want to open a form named frmContacts, based on a Contacts table, from a button.
For this you'd put the following in the button's Click event procedure:
DoCmd.OpenForm "frmContacts"
Taking it a little bit further let's say you want to include an unbound text box named txtLastName in the form with the button, so that the form opens filtered to those contacts with the name entered into the unbound combo box.
For this the OpenForm method includes a WhereCondition argument into which an expression to filter the form is entered.
The expression must evaluate to True for those rows in the Contacts table where the LastName column (field) is the name you've entered into the text box.
So the code in the button's Click event procedure now becomes:
Dim strCriteria As String
strCriteria = "LastName = """ & Me txtLastName & """ Or " & IsNull(Me.txtLastName)
DoCmd.OpenForm "frmContacts", WhereCondition:=strCriteria
A few things to note about this:
1. The expression for the WhereCondition argument is first assigned to a variable declared as String.
The variable is then used in the last line of the code.
2. The expression will be evaluate to True if the LastName column is the same value as that you entered into the text box, OR if the text box is Null, i.e. left empty.
Consequently if a value has been entered into the text box the expression will only be True for those rows where the LastName value is that of the text box, and only those rows will be returned in the form.
If the txt box is Null, however, the expression will evaluate to True for all rows in the table, regardless of the LastName value in the row, so all rows will be returned in the form.
3. Because LastName is a string the value entered into the txtLastName control must be wrapped in literal quotes characters in the code.
You can't just use the " character because that is already being used in the code as the string delimiter.
To get round this you enter a pair of contiguous " characters "".
Access interprets these as a single literal quotes character. You might be tempted to use ' instead, but this would fail with names like mine in its original non-anglicized form of Cináed O'Siridean because of the apostrophe in my surname.
If you are unfamiliar with entering code into a form's, report's, report section's
or control's event procedures, this is how it's done in form or report design view:
1. Select the form, report, section or control as appropriate and open its properties sheet if it's not already open.
2. Select the relevant event property and select the 'build' button (the one on the right with 3 dots).
3. Select Code Builder in the dialogue and click OK.
This step won't be necessary if you've set up Access to use event procedures by default.
4. The VBA editor window will open at the event procedure with the first and last lines already in place.
Enter or paste in the code as new line(s) between these.