I have a combo box with a list of surnames and I want the first name combo box to update depending on what is selected in the surname box.
It works the first time but then the whole form has to be reset before it will work again.
SELECT DISTINCT dbo_Staff.LName
FROM dbo_Staff
ORDER BY dbo_Staff.LName;
Rowsource for cboFName is:
SELECT dbo_Staff.FName
FROM dbo_Staff
WHERE (((dbo_Staff.LName)=[forms]![frmpassword]![cboLName]));
The first combo box (cboLName) is a drop down list of surnames for the user to select one.
Once select I want the corresponding first names to appear in the second combo box.
That works great, but can I get it to appear in cboFName straight away rather than always having to use the drop down? It's just that sometimes there will only be one first name so they shouldn't need to use the drop down.
I'm gettin an error message when I change the FName combo box saying:
Microsoft Access can't find the macro '.'
The macro (or its macro group) doesn't exist, or the macro is new but hasn't been saved. etc....
It's fine on the first name in the list but when I change it this error pops up. Any ideas???
This happens without adding
Me!cboFName = Me!cboFName.Column(0, 0)
Or this:
Me!cboFName.ListIndex = 0
No I haven't wrote any code in the Onxxxx property. It's all inside an event procedure. The only code I've got is inside the rowsource of the combo box LName.
Never mind, I've just deleted it and created a new one and it seems to be working now. Must've been something but I couldn't see anything! Thanks for your help.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.