Good User Interface to add to combo box?

D

Dennis

Hi,

I would like to come up with a standard user interface for adding items to
combo boxes while user is in the data entry form. That is, while they are
doing data entry, they come across a "look up code" / foreign key that needs
to be added to the foreign key look up table.

What is a good UI to allow users to add look up codes?

I have though about:

1. Puting the work "Edit" or "Add" next to the combo box and if they click
on that, I'll bring pop up the appropriate look up code / foreign key data
entry form. I don't like this approach because it takes up form space, but
it is intuitive.

2. Including the work "New" in all of my combo boxes where the user can add
a look up code. If they select "New", then I'll launch the appropriate data
entry form. I can either make the "New" selection be either the first or
last entry in the combo box so they can easily find it. This also seems
intuitive.

3. If they double click on the combo box, I'll then bring up the
appropriate data entry form. My only concern here is this approach is not
intuitive, but it would be the simplest to implement.

I don't like the idea of a user typing in a look up code / foreign key
description and if there is not a matching one, then asking if they want to
add it. I'm concerned that they will type in the wrong description and I'll
end up with a mess.



Any thoughts or other suggestions?
 
K

Keith Wilby

Dennis said:
Hi,

I would like to come up with a standard user interface for adding items to
combo boxes while user is in the data entry form. That is, while they are
doing data entry, they come across a "look up code" / foreign key that
needs
to be added to the foreign key look up table.

What is a good UI to allow users to add look up codes?

Look at the "not in list" property in the help.

Keith.
www.keithwilby.co.uk
 
J

Jack Leach

If you need to have a controlled list (i.e. - Not In List won't work, you
want to add an item to your list instead), usually what I'll do is put an
"add" button next to the combo box. (your op 1). Open a quick form in
acdailog for them to add an item and requery the control after.

These seems to be the easiest method, allowing for clean entry without being
too cumbersome to design. Luckily, these type of "lookup item entry" forms
are generally very small and easy to set up.


--
Jack Leach
www.tristatemachine.com

"I haven''t failed, I''ve found ten thousand ways that don''t work."
-Thomas Edison (1847-1931)
 
M

Mr. B

Dennis,

The "On Not in List" event is exactly what you want to use.

Here is a link that provides some info about using the "On Not In List"
event to accomplish exactly what you want to do.

http://www.databasedev.co.uk/not_in_list.html

In this example the new value is just added directly to the underlying data
source, however, you can modify the code to open a data entry form where you
can then use other options to make sure that the data provided by the user is
good, clean data.

-----
HTH
Mr. B
http://www.askdoctoraccess.com/
Doctor Access Downloads Page:
http://www.askdoctoraccess.com/DownloadPage.htm
 
D

Dennis

All,

Here is my problem with the "Not in List" Event.

I have a generic table in which I place 99% of my foreign key lookup records
which just need a descrition and short desc field. If the lookup code needs
additional data fields, I create a table and form for it. The layout of this
table is :

tblLookUpD
The primary key is a two part key. First part is Code Type and 2nd part is
Code

CodeType - The code type contains the code for the type of foreign key -
such as Member Type (MT), State (ST), Payment Type (PT), etc.

Code Key - This is the actual code such as AL for Alabama, CA for
California, etc.

Long Desc - 30 character field for a complete meaningful name of the code.

Short Desc - 10 character field for a very short desc of the code. I use
this in reports where space is tight.


So simply adding a Yes / No question will not do me much good. I guess if
the user answers "Y" to the Add question, I could pop up the foreign key data
entry form.

It just seems akward.
 
M

Mr. B

Dennis,

I would appear that you did not understand what the "On Not In List" event
does. There is nothing about this that is remotely related to adding a
yes/no field. The On Not In List is just an event like any other event for a
control. It is just a trigger. You can then code anything to be done from
that point forward.

If realize that your situation may be rather intrecate but that does not
mean anything excpet that you will have to do more programming to cause all
of the requirement of adding the new record to be met before allowing the
user to create the new record and have that new record be displayed in the
combo box.

If you will look at the discussion at the link provided, you will see that
VBA code is used. You will just have to modify the code, adding what your
requirements are.

-----
HTH
Mr. B
http://www.askdoctoraccess.com/
Doctor Access Downloads Page:
http://www.askdoctoraccess.com/DownloadPage.htm
 
D

Dennis

Mr. B,

I understand what the On Not in List Event is an Event and that I have to
add VB to the event. I did look at the discussion at the link provided.

If you look at the page you will see that the example puts up a Yes No
question in a message box "SQL is not currently in the list. Do you want to
add it?" for the user to answer. Hence my comment "So simply adding a Yes /
No question will not do me much good." and I went on to explain why my
situation is more complicated than the example you sent.

I do appreciate you comments though. I know about the "Not in List" event,
but I don't like that approach. It just not vey elegant. I was hoping to
discover a better approach.
 

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

Top