Coding combo boxes

J

Jacqueline

I need to have someone confirm I am not going nuts. After working in Access
Form 2003 on my last project, use a little bit of VB code enabled me to build
in a little more function and some nice to have things, like clearing the
combo box once the user selected the record they wanted on the form.

Now working in 2007, when I open the VB code all the code is either hidden
or I am not holding my mouth right. When trying to adopt the same code that
worked in my last db (2003) it blows up in 2007.... Can someone tell me what
I am doing wrong before I pull out all my hair!
Thanks so much,
 
L

Linq Adams via AccessMonster.com

I don't run 2007, but as I understand it, the work done by things generated
by Wizards is done thru embedded macros, which may be what you're missing.
You can still use VBA code, butode does not run in 2007 unless your database
resides in a folder that has been declared a “trusted†location.

To trust your folder, click:

Office Button (top left)
Access Options (bottom of dialog)
Trust Center (left)
Trust Center Settings (button)
Trusted Locations (left)
Add new location (button)
 
J

Jacqueline

Thanks, I can now see the macro code that was built when I used the wizard,
but the VB code is still either hidden or blank. Did they move away from VB
in 2007 to more use of Macros?

Do you know how to clear the combo box once the user has selected the record
they want on the form. I know it is a small thing but anything that keeps me
from getting a call from the users is worth the effort. Here is the Macro
code that is in the Afterupdate event:

, , First, ="[SID] = " & "'" & [Screen].[ActiveControl] & "'"

when useing the VB code all I had to do was set the ME! combo? = Null just
prior to the end sub... and it worked great!
Thanks
Jacqueline
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top