View Full Version : Combo Box & Free Text?


GFelstead
05-27-2008, 08:47 AM
Hi all,
I'm new to Access and been fiddling about this afternoon making a Contact Database.
I have a field for 'Company Name'. So users don't type variations of one company name I created a Combo Box from another Table which contains all of our client names in.
The problem I have is that I want to create some records for friends/leads/suppliers etc which I don't necessarily want to create a company record for.
I've worked out how to set 'Limit to list' to No but if I want free text it only lets me put in numbers once I've set the validation etc.
Is there a way I can have the drop down combo box or write free text if I wish?
Hope this makes sense!!

Thanks in advance

Gemma

DCrake
05-28-2008, 02:17 AM
If you want to retain the friends/leads/suppliers as you indicate then you are going to have to store them somewhere. Also you need to think about populating the combobox with the source data. if you store them in two different places then you are making life difficult for yourself when you come to refresh the combo.

Just a thought:)

GFelstead
05-28-2008, 04:06 AM
Ok - I've changed the form so that the combo box has a drop down with all of our clients in. I've made one of them 'Other' and created another free text box underneath so that one-off's can sit here instead of creating a whole company just for one record.
How can I tell access to only let users write in that box if other is selected?

Thanks for your help already

Gemma

DCrake
05-28-2008, 04:38 AM
On the AfterUpdate or OnClick property of the combo box employ the following logic:

If combo box = "Other" then
text box.Locked = True
text box.Enabled = False
Else
text box = ""
text box.Locked = False
text box.Enabled = True
End If

Code simplified for brevity

David