Drop down box changes

S

smason

Hello i have a list box in a form which chooses an employee, when this is
done we then populate the rest of the form, what i want to do is once the
employee has been chosen i want users to be unable to change the drop down
box info! is this poss!

thanks in advance
 
A

Al Campagna

SMason.
What Employee field do you capture in your combo, and how are you
"populating" the other employee fields on the form?
Are you asking to lock the combo after entry, or the other employee
info fields on the form?

You shouldn't be capturing the other Employee information at all...
just displaying it.

Let's say you combo (cboEmpID) that has 3 columns...
EmpID EmpName EmpDept
51 Bob Smith Sales
Use EmpID as the ControlSource.
Set the NoOfColumns to 3, with with ColWidths set to 0"; 1.5"; 0" (the
zero indicates hidden)
This setup will allow the user to select an Employee by Name, but
really store the EmpID in the bound EmpID field.

Now... place an unbound text control on the form with the following
ControlSource...
= cboEmpID.Column(2)
(Combo columns are numbered 0, 1, 2, 3, etc.. left to right.)
This unbound field will always display the Dept of whatever EmpID is selcted
in the combo.
And, since they are calculated, they can not be altered.
Add any other fields to the combo columns that you neeed to see on your
form, and "display" them using the method above.

On my website (below), I have sample A97 and A2003 files under the
heading of "Combo populates multiple fields" that demonstartes this
technique.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
A

ahmet avcı

iletide şunu yazdı said:
Hello i have a list box in a form which chooses an employee, when this is
done we then populate the rest of the form, what i want to do is once the
employee has been chosen i want users to be unable to change the drop down
box info! is this poss!

thanks in advance
 
S

smason

Hello!

Sorry i have the data being displayed in text boxes that works fine! what i
would like is for once the dropdown box has been selected it can't be
changed!
 
P

Pat Hartman

Your problem may be that you are using a bound combo for searching. If that
is the case, create an unbound combo, the wizard will walk you through the
process. Choose the option to find a record on the current form. Then
lock the bound combo by setting its locked property to true.
 

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