View Full Version : Please Help - Combo boxes showing blank after the first record on a form


Zantar
05-03-2001, 10:28 AM
Hi,

I have a form which is based on a table "A". One of the columns in table "A" is a foreign key to table "B". So for that column in table "A", I created a combo box which has a row source which is a query "SELECT IDENT, DESCRIPTION FROM TABLE B".

The column in table A needs to be the IDENT from table B. However, I want to show the description in the combo box.

I have done this by setting the width of the first column (Ident) to 0 and making the form combo box bound by the first column. This shows the description and not the ident.

MY PROBLEM: Is that if I have 400 records in table A, the first record on the form will show a value in the combo box correctly, but as I navigate through the form as soon as the combo box value changes (Different ident), it goes blank.

I have had this happen many times and the only way I was able to fix it is to show the first column in the combo box. However, this means NOTHING to the user and is confusing. I only want to show the description.

Another wierd thing... If I switch between datasheet and form view a couple times, the value shows up.

Please help.

Dave

charityg
05-03-2001, 11:11 AM
Have you tried setting your combo box equal to the ident value in the oncurrent event?

Zantar
05-03-2001, 11:25 AM
Thank you...

It now works 100% in the form view which it was not doing before.

Now the only problem left is that when the form is opened in datasheet view, the combo box is blank. Even if you switch back to form and it shows up.