View Single Post
  #6  
Old April 22nd, 2010, 04:43 PM posted to microsoft.public.access
Song[_4_]
external usenet poster
 
Posts: 43
Default Make combobox blank in macro

On Apr 21, 11:17*pm, Wayne-I-M
wrote:
Hi

You really need to try at least to not use macros. *There is only so much
you can do with them.

Have a go and see what happens like this.
Open you form in design view.
Right click your combo
Open the properties box
In the event coloum select the Got Focus row
Right click and select build (...)
Add this in between the 2 lines on code that are already there

Me.NameOfCombo.DropDown

(Change the NameOfCombo to what it really is)
Save

Now when the combo have the focus it will "drop down"

Hope this helps

--
Wayne
Manchester, England.



"Song" wrote:
On Apr 21, 12:45 pm, Wayne-I-M
wrote:
Hi again


I have just checked on how to use macros - sorry don't use them very often


If you really wan tto use the macro
open the macro in desgin view
add a new line (row) "under" the ones you already have
Select - Go To Control *- add the name of another control on your form "not"
the
combo
Note you have to do this
Add another line and select Set Value - add you combo to the Item row
In the Expression row add *"" *-
thats 2 x " by the way


Hope this helps


--
Wayne
Manchester, England.


"Song" wrote:
I use a wizard to create a combo box to find the record in my form. It
creates macro automatcially. Works fine. After finding the record, I
want to set the combo box to null or "" but need help add that line in
macro.


Thanks.
.- Hide quoted text -


- Show quoted text -


Hi, Wayne:


It works! I'm using Access 2007 so wizard creates macros instead of
sub/end automatically. So I just try to learn macro as it does not
create module.


Now what's the macro for 'dropdown' at 'gotfocus' event? Thanks.
.- Hide quoted text -


- Show quoted text -


Hi, Wayne:

Yes. I'm learning VBA and it's much more powerful than macro. However,
Whenever I run wizard, it generates macro instead of vba (I'm using
Access 2007). Combo box wizard generates one line of macro to find a
record. Command button wizard generates 6 lines of macro to delete a
record. Is there a way to set wizard to generate VBA instead of macro?
If not, is there a way to convert wizard generated macro to vba?