M
Marshall Barton
SG said:So I have scrapped the form completly and started afresh.
All is now working apart from one strange thing which happens. Let me
explain.....
When I us the Combo (Supplier) and select the supplier and then use the
Combo (Product) to select the product it diplays the correct products from
the selected supplier.
If I then select a diferent supplier for the next record on the datasheet
the previous records product goes blank, I then go on to select the product
forthe new record which
again offers the correct products for the chosen supplier but the previous
records product remains blank, why is this?
If I then for the next record select the same supplier as the first the
product in the first record reappears but the second record which has a
different supplier name disappears and so on.
Arrgghhh, so it was a corrupted form. Well, stuff happens
:-\
What you are seeing now is the consequence of using a
dependent combo box on a continuous or datasheet form. The
reason is simply that there is only one RowSource property
and it is used to display all the rows. Unfortunately, the
workaround is sort of messy.
First, modify the form's record source query to join the
products table to your form's table on the ProductID field
and add the ProductName field to the field list.
Then add a text box to the form's detail section and bind it
to the product name field. This text box should display the
correct product name on every row in the form.
Now, to keep user actions from using the text box, add a
line of code to the text box's GotFocus event procedure:
Me.CBOProduct.SetFocus
When you get all that working, size and position the text
box on top of the text portion of the combo box.