Form ComboBox

chris89

Registered User.
Local time
Today, 02:27
Joined
Nov 28, 2011
Messages
71
Hello there!
I have a form with 4 comboboxes.The comboboxes look in specific tables so that the user has a drop down menu to choose from.
I've also created a button to clear the comboboxes, but this doesn't work !

I 've tried the followin:g On click ->Code builder ->

Private Sub Command1_Click()
Me![cmb1]=Null
End Sub

Private Sub Command1_Click()
cmb1.RowSource=""
End Sub

Private Sub Command1_Click()
cmb1.Value=""
End Sub

and nothing happens when I click it!
Can anyone advise me on this please?
 
Code works fine for me, in Access 2003. What version are you running? Does any VBA code run?

Code does not run in 2007/2010 unless your database resides in a folder that has been declared a “trusted” location.

To trust your folder, click:
  1. Office Button (top left)
  2. Access Options (bottom of dialog)
  3. Trust Center (left)
  4. Trust Center Settings (button)
  5. Trusted Locations (left)
  6. Add new location (button)
Here's a visual for it, courtesy of BTAB Development:

http://www.btabdevelopment.com/ts/default.aspx?PageId=13

If that doesn't do it, you might check to see if you have a Missing Reference to Windows Common Controls. I have seen a report of this causing this problem, when moving up from previous versions.

Linq ;0)>
 
Thanks that was it!
 

Users who are viewing this thread

Back
Top Bottom