[AccessD] RE: AccessD Digest, Vol 23, Issue 29

Klos, Susan Susan.Klos at fldoe.org
Tue Jan 18 11:34:51 CST 2005


You may have already solved this problem as I don't see things from this
list until I get the digest message.  If you haven't solved it, let me side
with Rocky on this one.  I have a combo box which holds active and complete
projects.  I wanted the users to see all of their projects or just the
active ones.  I created a check box which I called complete and when a user
completes a project the box gets checked.  When the form opens the SQL
checks the status of the check box and brings into the combo box either all
records or just the active ones.  If you want more details, let me know.

Susan Klos
Senior Database Analyst
Evaluation and Reporting
Florida Department of Education
850-245-0708 
sc 205-0708
 


Date: Mon, 17 Jan 2005 13:12:04 -0500
From: Joe Rojas <JRojas at tnco-inc.com>
Subject: [AccessD] Need help with a combobox issue
To: "'Access Developers discussion and problem solving'"
	<accessd at databaseadvisors.com>
Message-ID:
	<0CC84C9461AE6445AD5A602001C41C4B05A0C6 at mercury.tnco-inc.com>
Content-Type: text/plain;	charset="iso-8859-1"

Hi All,

I have a combobox that is bound to a field. The field stores the employee
number that is associated with the current record. The data for the combobox
is pulled from a table and the combobox is set to limit to list. The list is
made up of two columns, one for the employee number (bound column) and
another to display the employee's name. The employee number column is set to
0" so that only the employees name is visible. Because employees come and
go, I have added the ability to edit which employees are shown in the
combobox list. This allows the addition and removal of new and old employees
respectively.

At the time a record is created the associated employee would have been in
the combobox list because they would be an active employee. Some time after
the creation of this record the employee may leave the company and would be
remove from the list of the combobox but the record would still reference
the terminated employee. If someone were to go back and look at this record,
it would display nothing because the employee is not in the list. I added
some code that checks to see if the Text property of the combobox is an
empty string and if so look up the name of the terminated employee and set
the combobox's Text property accordingly. The problem with this is that it
generates a NotInList error and you are forced to undo the change in order
to move on.

Any ideas on how to work around this. I would like to keep the ability to
modify the list of active employees so that users do not waste time weeding
through old employees while allowing the combobox to display the employee
name of someone who is no longer with the company.

Any help will be greatly appreciated!

Thanks
JR



This electronic transmission is strictly confidential to TNCO, Inc. and
intended solely for the addressee. It may contain information which is
covered by legal, professional, or other privileges. If you are not the
intended addressee, or someone authorized by the intended addressee to
receive transmissions on behalf of the addressee, you must not retain,
disclose in any form, copy, or take any action in reliance on this
transmission. If you have received this transmission in error, please notify
the sender as soon as possible and destroy this message. While TNCO, Inc.
uses virus protection, the recipient should check this email and any
attachments for the presence of viruses. TNCO, Inc. accepts no liability for
any damage caused by any virus transmitted by this email.


------------------------------

Message: 2
Date: Mon, 17 Jan 2005 10:38:30 -0800
From: "Rocky Smolin - Beach Access Software" <bchacc at san.rr.com>
Subject: Re: [AccessD] Need help with a combobox issue
To: "Access Developers discussion and problem solving"
	<accessd at databaseadvisors.com>
Message-ID: <046701c4fcc3$bdda9e60$6501a8c0 at HAL9002>
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
	reply-type=original

Joe:

I would put a checkbox on the form labeled "Show Inactive Employees".  Set 
it default to false and leave the record source of the combo box as it is 
now withthe inactives not shown.

In the after update event of the check box change the record source of the 
combo box to show or suppress the Inactives depending on the current value 
of the check box and don't forget to requery the combo box after you change 
the record source.

HTH

Rocky Smolin
Beach Access Software
http://www.e-z-mrp.com
858-259-4334





More information about the AccessD mailing list