Hi, I am fairly new to combo box's and would appreciate someone helping me. I have a Main form named Students and a tab with a subform named Goal the following code and Row Source for the subform.
I thought everything was working fine, then I realised cboTarget and cboStrategy are not allowing me to make a selection and by default only accept the first in the list.
Has anyone any suggestions? Any help appreciated.
Here is my code:
Option Compare Database
Private Sub cboFocus_AfterUpdate()
cboFocus.Requery
Me.cboTarget = Me.cboFocus
Me!cboTarget.Requery
End Sub
Private Sub cboStrategy_AfterUpdate()
cboStrategy.Requery
Me!cboTarget.Requery
End Sub
Private Sub cboTarget_AfterUpdate()
cboTarget.Requery
Me.cboStrategy = Me.cboTarget
Me!cboStrategy.Requery
End Sub
Row Source Information
------cboFocus
SELECT Focus.FocusID, Focus.Focus
FROM Focus
ORDER BY Focus.Focus;
------cboTarget
SELECT Target.FocusID, Target.Target
FROM Target
WHERE (((Target.FocusID)=Forms!Students!Goal.Form!cboFocus))
ORDER BY Target.Target;
------cboStrategy
SELECT Strategy.TargetID, Strategy.Strategy
FROM Strategy
WHERE (((Strategy.TargetID)=Forms!Students!Goal!cboTarget))
ORDER BY Strategy.Strategy;
Thanks in advance,
Tanya from Oz
I thought everything was working fine, then I realised cboTarget and cboStrategy are not allowing me to make a selection and by default only accept the first in the list.
Has anyone any suggestions? Any help appreciated.
Here is my code:
Option Compare Database
Private Sub cboFocus_AfterUpdate()
cboFocus.Requery
Me.cboTarget = Me.cboFocus
Me!cboTarget.Requery
End Sub
Private Sub cboStrategy_AfterUpdate()
cboStrategy.Requery
Me!cboTarget.Requery
End Sub
Private Sub cboTarget_AfterUpdate()
cboTarget.Requery
Me.cboStrategy = Me.cboTarget
Me!cboStrategy.Requery
End Sub
Row Source Information
------cboFocus
SELECT Focus.FocusID, Focus.Focus
FROM Focus
ORDER BY Focus.Focus;
------cboTarget
SELECT Target.FocusID, Target.Target
FROM Target
WHERE (((Target.FocusID)=Forms!Students!Goal.Form!cboFocus))
ORDER BY Target.Target;
------cboStrategy
SELECT Strategy.TargetID, Strategy.Strategy
FROM Strategy
WHERE (((Strategy.TargetID)=Forms!Students!Goal!cboTarget))
ORDER BY Strategy.Strategy;
Thanks in advance,
Tanya from Oz