By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,466 Members | 1,741 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,466 IT Pros & Developers. It's quick & easy.

Clearing a label used to display info from a combo box based on a linked table

P: n/a
I have a table with information about different people...(i.e. Name, Address,
Phone, Fax, etc.). The table has been linked to Access. I have created a
combo box that uses this information. There are eight columns in the combo
box, seven of which are hidden. Therefore upon a selection the information
that was hidden is now displayed on some labels at the bottom of the page. I
used code similar to the following to make this work:

lblPersonName.Caption = dropdown.column(1)
lblPersonAddress.Caption = dropdown.column(2)

This code was entered into the After_Update section of the combo box.

Here is the problem:

If I select a person in the combo box everything works perfect...All the
information is displayed as it should be, but if I put the cursor into the
box and manually clear the selection, I need the information on the labels to
disappear. At the moment if I try to do this it says something about
accepting null values....

How would I accomplish this?

Thanks for your time and help...

Shannan

--
Message posted via http://www.accessmonster.com
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
does this work ?
lblPersonName.Caption = nz(dropdown.column(1) ,"")

table data is null
text box expects ""

Nov 13 '05 #2

P: n/a
The code you posted looks pretty good, but for some reason it doesn't work.
When I manually clear out the text box, the information stored in the labels
stays there. This is a pain...

Thanks for your consideration,

Shannan

--
Message posted via http://www.accessmonster.com
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.