Share via

Access 2013 button wizard

Anonymous
2019-02-01T14:36:35+00:00

I am trying to learn to use Access 2013 professional.  When I try to use the button wizard, after I size the size of the button a message appears "Undefined function 'AppLoadString' in expression"

My copy of the application is up to date.

What do I need to do to correct this fault please.

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

8 answers

Sort by: Most helpful
  1. Anonymous
    2019-02-02T12:13:07+00:00

    Essentially, what Access is telling you is that a function named AppLoadString could not be found in the code base. Since you're using the wizard, I would assume the wizard is adding code to the VBA routine or macro it's creating, and something has gone wrong with that process.

    Have you tried doing this in a new database? Sometimes databases can become corrupt, which cause odd behavior. If you can't recreate the error with a new database, then corruption may be the culprit.

    If you try in a new database and get the same error, then you may need to reinstall Office. In some extreme cases, you must first uninstall Office to get things right.

    Was this answer helpful?

    3 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2019-02-02T17:31:07+00:00

    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.

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2019-02-02T13:26:11+00:00

    have just tried the same thing on my wife's computer.  She does not use Access at all.

    The same problem occurred.

    We both have new computers.

    Mine is a Acer Swift3 bought new in December 2018 running Windows 10.

    Hers is a Lenova ideapad 330S bought at the same time and running Windows 10

    John

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  4. Anonymous
    2019-02-02T13:15:51+00:00

    Thanks for your reply.

    I have uninstalled office 2013 and re-installed it.

    I have opened a new data base, just put a simple table, then opened a form.

    I tried to put a button on the new form and after sizing the button the same message "Undefined function 'AppLoadString' in expression" came up.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  5. Anonymous
    2019-02-02T12:36:42+00:00

    Thanks for that.

    I assume that if I uninstall Office 3013, when I come to re-install it my computer will still have the licence on it.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments