Combobox woes...

bmwilson

Registered User.
Local time
Today, 09:51
Joined
Dec 6, 2001
Messages
18
Hi guys, hope you can help...

I have a form (CustomerList) with a combobox (CustomerID) which is the primary key for the table, and a whole stack of bound textboxes with their info in it....

I want the user to be able to select an existing record based on the combobox selection (i can do this using the wizard) or type in an entire new record (easy too).

What I cant do is have a combobox that can do both...

I have thought about putting both types of combobox on the form and making 1 visible at a time, but would much prefer the "correct" method.

smile.gif


Ben
 
no no... not the not in list...

if the user chooses an existing customer from the combobox, it updates the form with that customers information...(part 1)

if the user types new customer information into the combobox, it creates a new record..

thanks for the link tho... I will use it for future reference..

smile.gif


Ben
 
You need two controls - the unbound combobox that is used for pulling up existing records and a bound textbox that is used for entering new records. I would set the enabled property to no and locked property to yes for the textbox. Then in the onCurrent event toggle those settings when the NewRecord property is true. That way the user won't be able to inadvertantly change the value of the textbox for existing records.
 
Thanks Pat...

I have a combobox (CustomerIDLookup) and a textbox (CustomerID) set up as you said...

The combobox selects the records ok and the textbox displays the value ok...

I need some help with the rest tho...

I want the combobox displayed in the same position as the textbox... eg so that the user will only see the arrow (on the combobox) appear and disappear as they use it.

Regards Ben
 
You can toggle the fields' Visible property in the onCurrent event.
 

Users who are viewing this thread

Back
Top Bottom