tina said:
okay. your cascading comboboxes are on a form bound to table3, but the
combobox controls themselves are unbound, and their RowSources are table1
and table2, respectively. when you open a form, it is normal for any
unbound
control to be "blank", unless you have a DefaultValue set for the control,
or set a value in the control, usually in the form's Load event.
once the form is open, any value that you enter in an unbound control will
normally remain as you move from record to record in the form - unless you
change or remove it with VBA code or a macro, usually in the form's
Current
event or perhaps another control's AfterUpdate event.
sorry to be dense, but i'm not understanding what behavior you're *wanting
or expecting* to see, and what behavior you are actually seeing. will you
explain further, please?
hth
Hi Tina, thanks again for your answer!
I didn't want to write a long and boring post, so I have been concise.
From your answer I understand a little more, now I'll try to be more clear.
So.....I have 4 tables linked among them with a relationship 1 to many
*TblCategory*
IdCategory
Category
*TblCustomer*
IdCategoria
Customer
Address1
Address2
Address3
Country
Tel
Ecc.
*TblExcursions*
IdExcursion
DateExcursion
N°People
Note
N°Invoice
AmountInvoice
Paid (Yes/No)
PaimentDate
IdCustomer
*TblEmployee*
IdEmployees
Staff
Fee
IdExcursion
The DataEntry Excursions has fields related the excursions and invoice
(TblExcursions) and a subform in a spreadsheet view, related Staff and Fee
(TblEmployee)
When the user (I am doing all that for a friend of mine, who uses excel)
records the excursion, first she opens the Customer Form, checks if the
customer is already present (TblCustomer), if so, then she opens the
DataEntry Excursions Form, in which there are two unbounded comboboxes, the
first is Category (Schools, Factories, Travel Agencies and so on) with these
properties:
DataTab=> RowSource (from inner query)
SELECT TblCategory.IDCategory, TblCategory.Category FROM
TblCategory;
EventTab=>AfterUpdate:
Private Sub Category_AfterUpdate()
Me!Customer.Requery
End Sub
the second unbounded combobox is Customer, which properties are as follows:
DataTab=>RowSource (from inner query)
SELECT TblCustomer.IdCustomer, TblCustomer.Customer, TblCustomer.Address1,
TblCustomer.Address2, TblCustomer.Address3, TblCustomer.Country,
TblCustomer.IdCategory FROM TblCustomer WHERE
(((TblCustomer.IdCategory)=Forms!frmDataEntry!Category)) ORDER BY
TblCustomer.Customer;
EventTab=>AfterUpdate:
Private Sub Customer_AfterUpdate()
Customer = Customer.Column(1)
End Sub
= = = = = = =
Here is the problem:
When the user selects the category, the cmb works fine!
When the user selects the filtered customer in the dropdown list in the
second cmb, the customers are displayed, but not set in the combobox and the
combobox remains empty.
Futhermore:
From another form, named FindNotSettledInvoice, with a double click I can
open the related record in the DataEntryExcursions, all the values are shown
in the fields exept the two unbounded comboboxes, which are empty.
I have been working from a week in solving this problem, but I don't want to
give up. Maybe I am close the solution and I don't know that......so I need
the help of experienced Access users.
I hope, I have been clear, if not ask again.
Kind regards,
Marc