B
bois
I am having trouble getting a unbound combo box to synch
with the rest of the form after updating it value via a
Macro and or simple event code. This is what my form look
like.
Form: Main
Subform: Sub1 with an bound text box: Departments; and
a combo box: people1
Subform: Sub2 unbound Combo box: people2
(note the two subforms are at the same level)
What I want to do is when I click on the "Departments"
text box I want to update the Subform Sub2 unbound combo
box "people2" with the value in Subform: Sub1 combo
box "people1"
Using either a Macro with the setVale function or the
Click EVENT running the following code Form![Main]!
[Sub2].Form![people2]=Me.people1. I can set the value of
the the combo box ComboSub2 to what I want; then the
trouble starts. Normally when I update the combo box by
using the mouse, code run from the "After Update" event
property and sync the combo box "people2" to the rest of
the Form sub2. Updating the combox "people2" via Macro or
Code the "AfterUpdate" does not run!!!
I tried lots of things and nothing works. I even added a
command button on sub2 that runs the same code the combo
box "people2' does, but I could not find now to programing
make it run.
This is the code that run on the "AfterUpdate" Event
property of combo "People2"
Dim rs As Object
Set rs=Me.Recordset.Clone
rs.FindFirst "[KeyE]= "& str(Me![people2])
Me.Bookmark=rs.Bookmark
My question is how can I get the form sub2 to sync with
the the combo box people2 on Sub2. I would like not to use
a filter.
Bois
with the rest of the form after updating it value via a
Macro and or simple event code. This is what my form look
like.
Form: Main
Subform: Sub1 with an bound text box: Departments; and
a combo box: people1
Subform: Sub2 unbound Combo box: people2
(note the two subforms are at the same level)
What I want to do is when I click on the "Departments"
text box I want to update the Subform Sub2 unbound combo
box "people2" with the value in Subform: Sub1 combo
box "people1"
Using either a Macro with the setVale function or the
Click EVENT running the following code Form![Main]!
[Sub2].Form![people2]=Me.people1. I can set the value of
the the combo box ComboSub2 to what I want; then the
trouble starts. Normally when I update the combo box by
using the mouse, code run from the "After Update" event
property and sync the combo box "people2" to the rest of
the Form sub2. Updating the combox "people2" via Macro or
Code the "AfterUpdate" does not run!!!
I tried lots of things and nothing works. I even added a
command button on sub2 that runs the same code the combo
box "people2' does, but I could not find now to programing
make it run.
This is the code that run on the "AfterUpdate" Event
property of combo "People2"
Dim rs As Object
Set rs=Me.Recordset.Clone
rs.FindFirst "[KeyE]= "& str(Me![people2])
Me.Bookmark=rs.Bookmark
My question is how can I get the form sub2 to sync with
the the combo box people2 on Sub2. I would like not to use
a filter.
Bois