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  

Default Value for Combo and List Box



 
 
Thread Tools Display Modes
  #1  
Old May 9th, 2008, 12:31 AM posted to microsoft.public.access.forms
Té
external usenet poster
 
Posts: 126
Default Default Value for Combo and List Box

I created a combo box in desing view on a form. When I toggle out into form
view and choose one of the items from the box that value remains when I go on
to the next records. How can I set it up after each entry it defaults back
to "select one." So on record one on my combo box I select Visa, then when I
go to record 2 I want it to automatically default back to select one. Please
help!
  #2  
Old May 9th, 2008, 03:17 AM posted to microsoft.public.access.forms
Linq Adams via AccessMonster.com
external usenet poster
 
Posts: 1,474
Default Default Value for Combo and List Box

I'm not sure what you mean by "Select One." Is this actually a value in your
listbox/combobox, or do you mean that you want nothing to be selected in the
listbox/combobox?

This will set them so nothing is selected:

Private Sub Form_Current()
YourListBox = Null
YourComboBox = Null
End Sub

This will set it to "Select One" if you actually have such a line in either
box:

Private Sub Form_Current()
YourListBox = "Select One"
YourComboBox = "Select One"
End Sub

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via http://www.accessmonster.com

 




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 08:01 PM.


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