Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old November 13th, 2005, 12:15 PM
Shannan Casteel via AccessMonster.com
Guest
 
Posts: n/a
Default Clearing a label used to display info from a combo box based on a linked table

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
  #2  
Old November 13th, 2005, 12:16 PM
lesperancer@natpro.com
Guest
 
Posts: n/a
Default Re: Clearing a label used to display info from a combo box based on a linked table

does this work ?
lblPersonName.Caption = nz(dropdown.column(1) ,"")

table data is null
text box expects ""

  #3  
Old November 13th, 2005, 12:17 PM
Shannan Casteel via AccessMonster.com
Guest
 
Posts: n/a
Default Re: Clearing a label used to display info from a combo box based on a linked table

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
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles