A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

VB Code for Drop Down List



 
 
Thread Tools Display Modes
  #1  
Old April 11th, 2008, 07:49 PM posted to microsoft.public.access.forms
Such a Beginner[_2_]
external usenet poster
 
Posts: 5
Default VB Code for Drop Down List

How do I create code that will enable me to hit enter on an item in an
Unbound Combo box drop down list, such that when I hit enter on that
particular item, it opens the related form?

Thus far, I've tried If ... Then ... Else statements, with 'DoCmd.OpenForm
"...", acNormal' actions, only to have the first action statement function
vs. the appropriate action statement for the Unbound = Item # from the drop
down list.
  #2  
Old April 11th, 2008, 09:16 PM posted to microsoft.public.access.forms
Golfinray
external usenet poster
 
Posts: 1,597
Default VB Code for Drop Down List

On the after update of the combo type docmd.openform [myform],,,

"Such a Beginner" wrote:

How do I create code that will enable me to hit enter on an item in an
Unbound Combo box drop down list, such that when I hit enter on that
particular item, it opens the related form?

Thus far, I've tried If ... Then ... Else statements, with 'DoCmd.OpenForm
"...", acNormal' actions, only to have the first action statement function
vs. the appropriate action statement for the Unbound = Item # from the drop
down list.

  #3  
Old April 20th, 2008, 04:47 AM posted to microsoft.public.access.forms
Larry Linson
external usenet poster
 
Posts: 3,112
Default VB Code for Drop Down List

"Such a Beginner" wrote

How do I create code that will enable me to hit enter on an item in an
Unbound Combo box drop down list, such that when I hit enter on that
particular item, it opens the related form?

Thus far, I've tried If ... Then ... Else statements, with

'DoCmd.OpenForm
"...", acNormal' actions, only to have the first action statement

function
vs. the appropriate action statement for the Unbound = Item # from the

drop
down list.


You don't indicate that you included a WhereCondition clause using the
selected value from the Combo. Read carefully the Help for DoCmd.OpenForm.
If you, then, can't make it work, post back here with specifics of what you
did... not just a single quoted instruction with ellipsis.

Larry Linson
Microsoft Office Access MVP


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:59 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.