Combo Box & Free Text?

GFelstead

New member
Local time
Today, 18:27
Joined
May 27, 2008
Messages
2
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
 
Simple Software Solutions

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:)
 
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
 
Simple Software Solutions

On the AfterUpdate or OnClick property of the combo box employ the following logic:

Code:
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
 

Users who are viewing this thread

Back
Top Bottom