correction:
Then click on the three dot button to the right of that combobox to open the click event procedure in VBA
Main Topics
Browse All TopicsI'm trying to edit an existing database we have here. The database contains all our donators, addresses, etc and is used to create mailing labels for thank yous, donations, etc. There are forms set up in our access database for ease of use. I did not set it up, but I am trying to edit it. We needed to add 2 extra donation types, "Appeals" and "Retreatants", so I created those fields in the corresponding database and added 2 checkboxes to the form for those.
Here is what I have done so far:
Opened the Mailing Labels form and created a new button and named it corresponding with other buttons (button_mlappeal), then right-clicked and "Build Event". Copied an event from other Mailing Label routines (see code) and renamed the table, query, and report names in the code. Created the actual table, query and report (I copied existing tables, queries and reports, then changed the important fields), and tested running the query independently - works as expected. It works exactly as the other buttons do when you run the query, so I know I've got that part done correctly
The problem is that the BUTTON doesn't run the query. I'm not sure why...I can run the query and it does the exact same thing as the other buttons do, but when I click the button I created on the form, it doesn't run the query. I don't know how to tell if I've got something mapped wrong with the button or not. The properties for the button seems to be identical to the other buttons.
What am I doing wrong that the button doesn't work when you click it? Keep in mind I am unfamiliar with database coding, but I do have a rudimentary understanding of structure, relationships, and I have experience coding in other languages, so I understand the principles here, just not the specifics of the software. I am using Access 2007, but I CAN use Access 2003.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Yes, it all looks correct. The button does have [event procedure] and the 3 dots take it to the first code below. Another button (one that does work) has the same thing on it as well [event prodedure] with 3 dots, and it goes to the lower section of code. As you can see both code snippets are identical except for the table, report, and query names. I have duplicated those objects from the second, working, button.
When I first read you question, I understood that pressing the command button does not activate the button_mlappeal_Click procedure. Is that the case? Place
MsgBox "Hello"
immediately after the first line:
Private Sub button_mlappeal_Click()
If you get a message box popup then that is working.
You have two queries in the code. Which query does not run? If it is the "qryDonator-Appeal-Mailing
Thanks for your help. You led me on the right track with the MsgBox thing. It was running the code, so I looked from there (I REALLY don't know alot about database), and I found out that the query was a make-table query, and you had to change the table that it made, and I found a few other mistakes looking through the properties of the reports and queries. Thank you!
Business Accounts
Answer for Membership
by: thenelsonPosted on 2009-09-18 at 10:58:11ID: 25368327
Make sure the on click event in the properties window for the button states [Event Procedure]. Then click on the thro dot button to the right of that combobox to open the click event produce in VBA If a different procedure opens, move the code to it.