Hi there,
In the criteria of your combos query under partner add something like:
=Forms!nameofform!nameofcombo1
You should set a default value to "combo1", and in the forms "on load" and combo1's "after update" events add:
You have to go to the VB enviroment:
In the after update event: You should see "Event Procedure". Click on the ellipse "..." button just to the right to open VB. It will label up a "sub" for you. Now type in between the title and the "end sub":
Me.TheNameOfTheCombo.requery 'Not literally of course...
Close & save and give it a go! Gord
ghubbell@total.net
But how do i clear combo2 box when i select something new in combo1. As it is now the name in combo2 doesn't update at the same time as I select a new in combo1
You have to have the same "requery" both when you load the form (to keep things tidy) and in the "After update" event of your Combo1. The after update of combo1 means as it sounds: after you update it do ... (requery combo2). As combo2 is now dependant on the value of combo1 (via the query) this should work and give you the associated result. Give it a check over & keep trying! Gord
ghubbell@total.net
No - I works fine when i select a new i combo1 the choices i combo2 canges.
BUT if I want to changes it again, I change combo1 - and them the choises in combo2 have also changed as they should, but in the field there stille is the choise from before.
What I want is to clear the choise in combo2 when I pick a new thing in combo1
I think I see what you're trying to do. add this line just before the other stuff in Combo1's After Update:
Forms![NameOfForm]![NameOfCombo2]= Null
This should "empty" it before the requery. I hope this will work for you!
Sorry I hit the wrong button there!
Change your lines to something like this:
Forms![NameOfForm]![NameofSubFormASSeenbytheMainForm].Form![NameOfCombo2]= Null etc...
Gord
ghubbell@total.net
Are both of your combos on the subform? If so then go back a step or two, ignore calling "from" the main form, BUT make sure your combos query criteria says:
Forms![NameOfForm]![NameofSubFormASSeenbytheMainForm].Form![NameOfCombo1]
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.