Wrox Programmer Forums
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old February 4th, 2006, 04:27 PM
Registered User
Join Date: Feb 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default ComboBox Selection Question

I am new at Access and I am trying to create a servey, but i need to create a drop-down box and be able to open/or not a text box depending on the drop-down selection.

If it's unclear, here's an example:

Combo box list:

If Mom or Dad is selected a text box would require a Date of bith entry.

Any help with this would be much appreciated!
Thanks in advance,

Make "someday" today!
Old February 6th, 2006, 12:20 PM
Friend of Wrox
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG

Welcome to P2P. You can do this several ways. I'm going to use fake names, so you have change those to your real names. Put this on the combobox's After Update event and also on the form's On Current event.

Select Case Me.cboPerson
    Case "Mom", "Dad"
        Me.txtDOB.Enabled = True
    Case Else
        Me.txtDOB = Null
        Me.txtDOB.Enabled = False
End Select

Or you can set Me.txtDOB.Visible = False instead of disabling it so the users can't even see it.

Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
Old February 11th, 2006, 01:14 PM
Registered User
Join Date: Feb 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

Thanks so much! :)
I've tried it quickly yesterday, but it didn't work. I am probably forgetting to do something. I'll try it again on Monday when i have some time.

Thanks again!

Make "someday" today!

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fill DataGrid based on the selection in combobox drani C# 12 October 11th, 2007 05:41 PM
Changing combobox based on selection iamme Visual Basic 2005 Basics 0 January 31st, 2007 09:04 PM
How to catch mouse selection on a combobox? jeffcflam Pro VB 6 0 May 24th, 2006 07:22 AM
Newbie-Access question-selection of entire field franzwil Access 3 September 27th, 2004 09:28 AM
USER SELECTION FROM A COMBOBOX AxeSess Access VBA 3 February 15th, 2004 06:48 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.