> ok, now i see whats dynamic rowsource. which brings me to a previous
> question: when to change it to show only active agents? on BeforeUpdate
> of that combo?
> and than switch back to all agents AfterUpdate?

Signature
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
[quoted text clipped - 20 lines]
> ColumnCount: 2
> ColumnWidths: 0";2"
not at all, mgfoster. form is filtered before, filter not afecting
that particular combo.
i simply use the form to review/enter some transaction. one of the
parameters of that transaction is AgentName. Agents may come and go,
but deals are still active . so out of 100 deals, 25 has AgentName
field of an agent who is not employed any more. i need to see those
AgentNames as i am going through the records,(or when creating
reports, for that matter), but when a new transaction has to be
entered, i want to see only the names of currently employed, active
agents in the dropdown list of the combo. So thats why i need a combo
to be bound to AgentName field in Transaction table( which is a
datasource for the form) .
so when i filter the rowsource of the combo(select...from...where
agents=active), i do get only active AgentNames, but at the same time
, i cant see the name of non-active AgentName when such a transaction
comes up.
i explained before , when i store AgentNames in the transaction table
everything is ok, but thats not really the way things should be.
i need to mention that this is only a temp soluton, as in near future
agent will log to start their session, and there will be no need for
that combo. but now i need to have it .
MGFoster - 07 Mar 2005 18:45 GMT
< SNIP >
> i simply use the form to review/enter some transaction. one of the
> parameters of that transaction is AgentName. Agents may come and go,
[quoted text clipped - 15 lines]
> agent will log to start their session, and there will be no need for
> that combo. but now i need to have it .
I believe I have it now: You want to see ALL agents in the ComboBox box
when editing old records; for New records only the ACTIVE agents should
appear in the ComboBox. If my assertion is correct then in the form's
OnCurrent event you will be changing the RowSource of the ComboBox.
E.g.:
Private Sub Form_Current()
Const SQL = "SELECT AgentID, AgentName FROM Agents "
If Me.NewRecord Then
Me!cboAgents.RowSource = SQL & "WHERE Active = True"
Else
Me!cboAgents.RowSource = SQL
End If
End Sub
HTH,

Signature
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
bbdata - 08 Mar 2005 16:13 GMT
> Hash: SHA1
>
[quoted text clipped - 17 lines]
>
> HTH,
thanks mgfoster
didnt know about newrecord property.
i have done somrthin similar, since i have add new deal option on the
swithboard. so i open form in add mode and change rowsource then.