Missing Values in Drop down Box

I

It's Shroff

I apologize in advance if I'm posting the wrong groups, but I have a
general
UI problem in my Windows apps that I'm wondering how other people may
have
solved. I am using VB.NET to devlope this application.

I can't think of a way to succinctly describe my problem right now, so
I'll
just give you a simple example:


Say I have two tables called tblStaff and tblDivision:


*tblStaff*
StaffID (pkey)
Name
DivisionID (fkey to tblDivision)


*tblDivision*
DivisionID (pkey)
Description
Active


tblDivision has an Active field that specifies whether the Division is
active or inactive. If it's inactive, it's no longer a valid Division
that
can be assigned to a staff record. (We do this rather than deleting
the
record, so we don't screw up our referential integrity for staff who
were
already assigned to that Division.)

My UI for a staff maintenance page would include a Name field and a
drop
down box for Division that is populated with the active Divisions in
tblDivision.

My problem arises when I'm trying to display the information for a
staff
(say, Bob Thomas) that had previously been set up with a valid Division

(say, ABC) that was subsequently set to inactive. If I'm only
populating
the drop down box with active Divisions, ABC will no longer show up in
the
drop down box, so if I try to look at Bob Thomas' record, it will
appear as
if he had no Division set, when in actuality he does and I'd like to
see
that.

I've seen reference to a solution people used in Access where they put
a
text box directly over the combo box, leaving the arrow portion of the
combo
box visible. To use my example, they would then display "ABC" in the
text
box and all the active Divisions in the combo box. Then, whenever the
user
tried to use the text box it would throw control to the combo box, so
the
user thinks they're just using a simple combo box.

So, I imagine lots of people have run into this issue. Anyone have any
other
clever solutions they'd like to share?

Thanks,
Big D
 
B

Bob Barrows [MVP]

It's Shroff said:
I apologize in advance if I'm posting the wrong groups, but I have a
general
UI problem in my Windows apps that I'm wondering how other people may
have
solved. I am using VB.NET to devlope this application.

This group is doubly off-topic for your post: ASP has nothing to do with VB,
and classic ASP (which this group covers) has nothing to do with .Net.

You will likely receive better/quicker help by posting to an appropriate
group such as microsoft.public.dotnet.languages.vb or one of the
windowsforms groups.

There is no reason to apologize for this. Nobody is offended by your posting
this message here. We just want you to get help as efficiently as possible.

Bob Barrows
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top