while in combo box...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a combo box that is searched by physicianlastname. User starts to
enter data -
the dropdown fills with concatenated data showing first name, address etc.
If the name not in list, physician form pops up.

The problem: if the physicianlastname already exists, but it is a different
person (eg. Dr Joe Black, Dr. Joe Black, Jr.) i need an easy way for the user
to add new record. It needs to be obvious to the user what to do when the
name already exists but is another person.
Any ideas?

Thanks.

patti
 
I'm not sure what you are asking. The NotInList property and event check to
see if there is a match. You might add another column with a phone number to
distinguish the 2 but if they were in practice together, that might not help
either. If you know that the only difference is the name's suffix (Jr. or IV
for instance) then add that to the lookup, and the NotInList event will
fire.
 
thanks for a quick reply.

i already have the combo box set up to show multiple columns so that user
can pick correct person. The problem is that there might be another Joe
Black, Jr. at a different address. I need to find a simple way for the user
to add this new person; the notinlist will not fire because the data in that
choice field (name) is the same.-

I'm thinking that there should be "add new" as an item within the combo box
list - clicking on that choice would open the new form. But i need that
choice to always be visible and obvious to the user. My users are not
computer-oriented and i need to make things as simple and clear as possible.
 
Put a command button beside the combo box.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)
 
man you're fast. thanks doug.
i had thought of that -
will clicking on that close out the dropdown?
is there a way to carry the data they've typed into the opened form?
 
thanks doug.

will that close out the dropdown? is there a way to carry over the data they
typed into the opened form's appropriate field?

patti
 
1) It will close the dropdown, but you can reopen it using

Me.NameOfComboBox.SetFocus
Me.NameOfComboBox.DropDown

2) You can use the OpenArgs property. When using the DoCmd.OpenForm, you
have the option of passing anything you want as the OpenArgs property. In
the form's Load event, you can check whether anything was passed to the
form's OpenArgs property (it'll be Null if nothing was passed).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top