Access 2007-2019
Access 2000-2003
Access Seminars
TechHelp Support
Tips & Tricks
Access Forum
Course Index
Topic Glossary
Insider Circle
Home   News   Tips   Glossary   Templates   Forums   Help   Logon   Order   Contact Us  


Microsoft Access Forum
By Richard Rost   Richard Rost on Facebook Richard Rost on Twitter Richard Rost on Google Plus Richard Rost on LinkedIn Email Richard Rost

Microsoft Access TutorialsTHE ACCESS FORUM HAS MOVED!

We are trying something new. We've moved the ACCESS FORUM to a Facebook Group.


Permanent Link
Keywords: microsoft access forum
Post New Topic

Read Command Button by Sara P @ 11/10/2019
Hi, I am getting this error, happened twice now in databases. Can't find much on the internet about it, can anyone help?

Undefined function 'AppLoadString'

I am in the early stages of a new database and have hardly any code. Only what Richard has taught me regarding a login page ;-)

Just trying to make a button with the wizard. I already copied all the tables and forms to a new clean database but it did the same thing. Was working but now suddenly not.

Solution would be very appreciate.
Show Just This Thread        Post Reply
Read Up and Down Command button Picture by Eric M @ 9/24/2019
I would like a command button that when clicked, the arrow changes direction up and down.  and then based on the direction, it does something.

Currently, I make this work by placing two buttons directly on top of each other so it appears as the same button and has the code.

Private Sub Qa14SortDB_Click()
    Qa14SortUB.Visible = True
    Me.Qa14SortDB.Visible = False
End Sub

Private Sub Qa14SortUB_Click()
    Qa14SortDB.Visible = True
    Me.Qa14SortUB.Visible = False
End Sub

Can this be done with one button?

If so, how does on change the direction using VBA.  And then how do you sort a field from the direction of that arrow?
Show Just This Thread        Post Reply
Read Problem with next record command button by MICHAEL J @ 10/14/2017
yes I did think of that and made sure I was using the form but it made no difference

Reply from Alex Hedley:

On a form with no subforms do the record selectors work correctly?
Show Just This Thread        Post Reply
Read Problem with next record command button by MICHAEL J @ 9/30/2017
I noticed after i posted my question that it also happens when i use the record selector, I have deleted the button and recreated it, same result.

Reply from Alex Hedley:

Are you using the record selectors from the correct form and not the subform?
Show Just This Thread        Post Reply
Read Problem with next record command button by MICHAEL J @ 9/24/2017
Hi Alex thank you for your reply. This is what i have for the button.
Button Properties:
Event. OnClick
       [Embedded Macro]
...    GoToRecord
       Object Type "Form"
       Object Name "Lot/OwnerDetailF"
       Record      "Next"

I have used command buttons many times but never had this before.

Reply from Alex Hedley:

I'm not sure about macros, never use them! Maybe another student could help...
Do you not use the Record Selectors along the bottom of the Form?
You could try deleting and recreating the buttons.
Show Just This Thread        Post Reply
Read Problem with next record command button by MICHAEL J @ 9/23/2017
I have a sub form within my main form, on the main form form i have command buttons to navigate the records. However when i try to go the the previous or next record it scrolls through the records on the subform first. How do i get it to scroll on the main form

Reply from Alex Hedley:

Are you using a macro or vba?
Have you set it against the wrong form?
Show Just This Thread        Post Reply
Read Problem Opening a Form With A Command Button by Colin M @ 3/2/2015

I got it fixed.  Thanks for your help.
Show Just This Thread        Post Reply
Read Problem Opening a Form With A Command Button by Colin M @ 2/28/2015
I am having trouble opening a form with a command button. It's probably something very simple that I'm missing. I'd appreciate any help.

I have a customer form "CustomerF" that I have placed a command button on, to open a second form "CreditCardF"containing credit card info for that customer. I have linked the "CustomerID" field in the two forms in the command button.

When I click on the button, the error message appears asking me to Enter Parameter Value "Forms!TestOrderF!CustomerID". If I enter the CustomerID then it opens to the "CreditCardF" form showing the correct credit card info. If I don't enter a CustomerID number and click OK it takes me to the "CreditCardF" with an empty record.

I'm not sure why it is referencing "TestOrderF" in the error message box. TestOrderF is a form that I enter order information into. The macro for the button shows:

Form Name = Credit CardF
Where Condition =="[CustomerId]=" & [CustomerID]
Window Mode: Normal"

Thanks in advance.

Reply from Alex Hedley:

I'd just delete the button and start with a fresh one.
Show Just This Thread        Post Reply
Read Command Button Wizard Makes Embedded Macros by Norm Bohana @ 1/24/2015
Thanks, I would like VBA code generate. Each time I create a new form it's not correct or complete. is there a way to show you what I mean?????

Reply from Alex Hedley:

You could upload a pic to Flickr or something similar and share the link.
You can set Access to use Code instead of a Macros for Events in the Options

If the Form is not correct then you need to update the Form to do what you want it to do.
What code did you type into your OnClick event in VBA?
Show Just This Thread        Post Reply
Read Command Button Wizard Makes Embedded Macros by Norm @ 1/21/2015
Sorry but I have not received any response from my last post

Reply from Alex Hedley:

So are you wanting it to be a Macro or use VBA in your Button?
Which Form isn't correct?
Show Just This Thread        Post Reply
Read Command Button Wizard Makes Embedded Macros by Norm @ 1/18/2015
First thanks for getting back to me. I just created a form in and old application and added a button using he wizard and it created VB code. I went to a new application and did he same thing and it created a macro. It's the same system. also the form was not correct.
Show Just This Thread        Post Reply
Read Command Button Wizard Makes Embedded Macros by Richard R @ 1/18/2015
I received a great question today from Norm. To paraphrase, he says he is using Access 2007 and whenever he creates a button using the Command Button Wizard (something like open a form, find a record, etc.) the button creates an Embedded Macro for him, which he doesn't want. He wants VBA so he can edit it.

Unfortunately, if you're using the Command Button Wizard, that's the default setting, and as far as I can tell, the ONLY setting for the Wizard. You can force Access to give you the VBA editor if you're making your OWN buttons, but changing the setting under File > Options > Object Designers > Always Use Event Procedures. This, however, doesn't change the Wizard. The Wizard will still give you an embedded macro.

There is a fix, however. When you're all done creating your Wizard-based buttons, in Form Design mode, click on the Design Tab and in the Tools section you'll see an option that says "Convert Form's Macros to Visual Basic." Click on that and Access will change ALL of the embedded macros in the form to VBA for you.

Easy enough?
Show Just This Thread        Post Reply
Read Changing Values in a subForm with Command button by Kevin B @ 5/7/2014
So I have developed a cost sheet SubForm for student charges, the student charges change depending on the program they are attending. What I would like to do is have a command button for each program and when it is click have the appropriate charges populate the fields in the sub form.  Can anyone please help with this?

Reply from Richard Rost:

So you want to select a program from a combo box, click a button, and then have that button add the individual line item charges to a subform? This is exactly what I cover when I teach how to select a product and add it as a line item to an order details subform. It does require some programming. I cover it in Access 302. You'll want to watch 301 first for the setup.
Show Just This Thread        Post Reply
Read Weird sized command buttons in Access 2013 by @ 9/28/2013
Eureka. It works. Thanks so much Richard. I have been trying to find a solution as well but was struggling to even describe the problem. All good.

Reply from Richard Rost:

Glad to help.
Show Just This Thread        Post Reply
Read Weird sized command buttons in Access 2013 by Jon @ 9/24/2013
I have had/am having the same problem. I have run all Microsoft updates and Office 365 is automatically updated so there is nothing to manually update but the problem persists. I have resigned myself to trial and error to get the sizes of buttons consistent.

Reply from Richard Rost:

OK, I spent about half an hour Googling this problem. And one guy said that he figured out the problem was because of a display setting in WINDOWS.

Go to your WINDOWS Control Panel > Display > Change the size of all items.

Make sure that this is set to SMALLER (100%) which is the default setting. If it's set to either of the larger settings, this problem occurs.

I am unable to get the problem to occur on any of my systems, so I can't verify the solution, so if you try this and it works PLEASE let me know and I'll post this as a bulletin in my Blog because I know a lot of people have had this problem. It must only be with certain display adapters.

Show Just This Thread        Post Reply
Read Command Buttons using 2013 by Eleanor Mason @ 9/18/2013
I was trying to deal with this but it is really becoming and I really don't know how to explain, when I move the button part of it is left behind, it's like it breaks up. I have a hard time sizing it, when I click on it to select it only part of the button is selected. When I try to make the button smaller the button only gets bigger. I know this doesn't make sense, I was wondering if anyone else was having this problem. None of my buttons on the main menu are the same size width or height. Never had this problem with 2010 or 07

Reply from Richard Rost:

Run an Office Update and then reboot. See if the problem recurs.
Show Just This Thread        Post Reply
Read Auto Advance for Command Button by George @ 1/13/2012
As Richard suggested, you would use the Timer Event and the Timer Interval Event.

Instead of a command button to go to the next record, create a macro that does just that. Then in the properties of the form, select the macro in the Timer Event property. Then, in the Timer Interval property, insert a number that will represent how long before the macro executes. This will automatically go to the next record after such an amount of time as elapsed.
Show Just This Thread        Post Reply
Read Auto Advance for Command Button by Ben Chua @ 1/13/2012
Richard, do you have a tutorial on this already?

Reply from Richard Rost:

Can you be a little more specific as to what you're looking for?
Show Just This Thread        Post Reply
Read Auto Advance for Command Button by Rick R @ 11/22/2011
Dave, there's no reason to buy that entire seminar just for one or two lessons (unless you're planning on setting up a web-based database). If I get some spare time over the next week or two, I'll try to put together a tutorial on JUST using a timer event. No promises, but I'll add it to my list.
Show Just This Thread        Post Reply
Read Auto Advance for Command Button by Dave Kidder @ 11/22/2011
Wow...thank you this is now on my Christmas list
Show Just This Thread        Post Reply
Read Auto Advance for Command Button by Dave Kidder @ 11/21/2011
I suspect I know the answer to this.  I have built a Form based on a Table.  I have installed Command Buttons for going to the previous and next record.  Is there any macro that would automatically "advance" to the next record after a period of time. Yes thats right I am planning on losing both my arms and will want things to just move along without me doing any work at all.  Actually I would like to build this form as a tool for increasing the reading speeds of the users.

Reply from Richard Rost:

You would have to set up a Timer event. I cover it in my Access Web Data Synch Seminar.
Show Just This Thread        Post Reply
Read Google map of zipcode from command button by Greg Beben @ 5/9/2011
Richard, you explained in an earlier reply how I could get Google to show me the correct format for a URL to show the map of a certain zipcode.  But what is the way to invoke such a map from a command button?  Is it a SHELL command to IE?  I tried using the hyperlink property, but I don't see a way to insert the correct zipcode on the fly.  I want to have the user double click a zipcode and have a map of that zipcode pop up in IE.

Reply from Richard Rost:

Yep. SHELL will work fine.

URL = ""
Shell """c:\program files\internet explorer\iexplore""" & URL, vbNormalFocus

The extra double-quotes are because of the spaces in the path the IE executable.

Now if you want to be real cool, you could also drop a WebBrowser control in your own form and use that instead of launching an external copy of IE. I cover that in my Web Synch seminar.
Show Just This Thread        Post Reply
Read Command Buttons by Lynn @ 3/26/2010
I have a main form with a subform that I use for data input.  The switchboard opens a blank form.  I created a "save form" command button.  Is there a way that a "new form" button can be created so that when I click "save" and then click "new" a blank form appears instead of going out and coming back into the database?

Answer from Richard Rost:

Sure. Just create a button that goes to a new, blank record which essentially is the same thing - it will save the current record and move the user to a new blank one.
Show Just This Thread        Post Reply
Read Access 2007 command button by Helen @ 1/23/2010
I have a form that I want to add a command button to, this command button would open up another form.  That form needs to automatically use the existing ID# of the previous form, automatically entering any related fields  to that record in. In other words, I need the new form that would open to already have the ID# number in it, with all related fields automatically entered because of the link created when the form was created.

Answer from Richard Rost:

I think this tutorial will answer your question:

If you want to refer to a value on a Form, you can use the notation:


You can use this notation inside of queries, other forms, or even reports. I have a free tutorial that explains how to use this:

Note that if you're refering to a value on a SUBFORM, the correct notation is:


Crazy, I know. Enjoy! Hope this helps.
Show Just This Thread        Post Reply
Read Bug in the Command Button resolved by Richard Rost @ 11/6/2009
Yes, everyone should DEFINITELY make sure they have Office 2007 SERVICE PACK 2 installed. There are a TON of little bugs in the original release of Office 2007. Thanks for the update.
Show Just This Thread        Post Reply
Read Bug in the Command Button resolved by Bob Lilly @ 11/3/2009
Hi Richard:
I found the problem with the Command Button. On both of my computers the Embedded Macro is the culprit. On my computers the Code is displayed as:
MRC Members Only Information Form,Form,,”[ID]=” & [ID],, Normal
The correct code should be:
MRC Members Only Information Form,Form,,=”[ID]=” & [ID],, Normal
As you can see the code on my machine is missing the first = sign. When I made the correction to the forms on my computer they ran without a hitch. This did not resolve the problem with the computer. Every time I would place a command button it would produce the same error.
In frustration I contacted Microsoft’s online help. A day later I was contacted by a Microsoft engineer. I explained what the problem was, he then logged on to my computer so that he could see what was happening as I created a Command Button. We and his colleges worked on this problem for four hours with no resolution. In frustration he sent me a file to delete all of the Office 2007 files, this was designed to remove all of the remnants of Office 2003 as well; this took close to an hour.  
Now we reinstalled Office 2007 from the original disk. When I opened Access and again tried to place a Command Button it produced the same faulty macro. Now they had me download a new Service Pack 2 for Office 2007. Now when I placed a Command Button it produced the correct Macro as listed above.
All told we worked on this problem for close to six hours. They acknowledged that there is a bug that will be addressed.
If others are having the same problem you might want to check your copy to see it is the same as mine. Go to Access Options, select Resources at the bottom, under about Microsoft Office Access you will find the build code. In my case it is (12.0.6423.1000) SP2 MSO (12.0.6425.1000).
My Support Request Number from Microsoft was SRZ091031000053 in case you have to contact Microsoft. They can then check the notes that the Engineer had documented on this problem.
I hope this fix, resolves the problem for all my fellow 599CD students.
Bob Lilly
Show Just This Thread        Post Reply
Read Command buttons in datasheet view by Richard Rost @ 3/16/2009
Tammy... Nope. You can't put command buttons on a subform in datasheet view. However, you can set the subform to Form View and make it show continuous forms. Then you can make it "look" like a datasheet (however you want) and put your buttons on it. Personally, I prefer making the field blue and telling the user he can double-click on it to expand it (open another form).
Show Just This Thread        Post Reply
Read Command buttons in datasheet view by Tammy @ 3/16/2009
Hi, I have a form with a contacts subform which displays multiple contacts associated with the main form. The multiple contacts are shown in datasheet view so that it is easy to see them in one place and add extra contacts. I want to limit the info shown here to the things that are used often such as phone and email and would like to have a command button associated with each contact that the user can press to open the full contact record. I have created the form to be opened and made the button but it won't show it in the subform. Is it possible to have buttons embedded in a datasheet? Thanks very much
Show Just This Thread        Post Reply

Collapse All Topics


Post Your Comments or Subscribe
    If you would like to be notified of new posts on this forum,
    just enter your email address below. It will be kept private.
If you just want to subscribe to get email updates when this forum is updated, then enter your name and email address and check the Notify Me box below. If you would optionally like to add your comments below to be posted, they are welcome.
  Your Name:  Required
  Your Email:  NOT Public


Sorry about this step. It's just to keep the spam bots away:
  Verify: What is 5+1:
  Notify me when the this forum is updated
  Remember Me for my next comments
Please do not use this form for Customer Service inquiries! If you have questions about your account, shipping info, courses you've ordered, need passwords, etc. please use the Customer Service Center instead.

I value your comments. They will be displayed on this page (above). Your name will be displayed, but your email address will not be.
As always, I promise to never give away your personal information to anyone else, ever.

NOTE: If you don't leave your name and email address, DON'T expect a reply. I can't promise a personal reply to everyone who posts here. I TRY my best, but I cannot guarantee it. If you don't leave your real name and email address, I won't even bother. I usually just hit DELETE. -Richard



You may want to read these articles from the 599CD News:

3/30/2020Access DateDiff Function
3/26/2020Sorted Combo Box Values
3/23/2020Browsing and Selecting Files
3/14/2020New Access Group
3/6/2020NEW Access 2019 for Beginners
8/15/2019Last Chance for Access CDs
8/1/2019Customer List Form Template
8/1/2019New Template Access Customer Database
7/30/2019Microsoft Access Developer 13
6/20/2019TIP: Validation Rules in Access

Visual Basicindex
Account Login
Online Theater
Lost Password
Free Upgrades
Insider Circle
Student Databases
Change Email
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search Our Site
Waiting List
Production Schedule
Collapse Menus
Live Chat
Customer Support
WalkThru Tutorials
Consulting Services
About Us
Affiliate Program
Richard Rost
Free Lessons
Mailing List
Video Tutorials
MYOLP Memberships
Idiot's Guide to Excel
Volume Discounts
Payment Info
Terms of Sale
Gift CDs
Live Chat
General Info
Support Policy
Contact Form
Email Us
Mailing Address
Phone Number
Fax Number
Course Survey
Facebook    Twitter

Google Plus    LinkedIn

Blog RSS Feed    YouTube Channel
Richard Rost Microsoft MVP