Problems implementing basic VBA in Access 2007
I'm trying to write some code for my database to enable a dropdown box in a parameter prompt for a query, but it's doing nothing instead of it's intended purpose. This: Dropdown in Access 2007 parameter query has been the source of my inspiration. Though I seem to be unable to implement even the most basic VBA code: Private Sub cmdReset_Click() Me.cboSelectName = Null End Sub (Yes this is not all my code! Just one of the subs) On the relevant form, I have a button called "cmdReset", which has "[Event Procedure]" for the event "On-Click". I also have a dropdown box called "cboSelectName" on said form. Also I have tried closing the database, and making sure to enable macros when it starts. So essentially this code should make the value in the dropdown box null when I click the reset button. However it does nothing, it simply deselects the dropdown box. Can anyone help me with this one? I'm keen to start implementing some VBA in my database!
As suggested by Remou, the code wasn't even running. I figured out my problem - I had saved the code in a new module, rather than in the VBA code for my form. Once I shifted the code into the form object, the reset button worked. I've also now got some nifty code working with the actual "generate report" command. VBA really has the power to take your database to a whole new level!
MS Access Dropdown List/Combo Box
How to communicate between two instances of open MDB with same form?
In Access 2007 CSV Export: Disable Scientific Notation
How do you format date fields of a Union Query in MS Access?
Porting MS Access application
automatically query and convert access db table to excel using vbs
Preserving linked tables for Access DBs in same folder when the folder changes
Disable warning: You copied a large amount of data onto the clipboard
How to get the name of Constraint?
Specify mdw file in embedded connection string to another Jet mdb: possible?
Validation Problem in vba text box
suppress write conflict message in Access VBA
How do I use a Checkbox on a form to add a record into a subform in Microsoft Office Access?
How to refresh linked tables in an Access mdb when ODBC changes
Query by month from date field
Parsing a web form in to a data table