L
Loris
Hi all,
in a subform I created I want the list of the possible values in a combobox
(Account_ID) to be updated depending on the value selected in another
combobox (Account_Type).
The main problem I am having is that the value is updated in all the rows of
the subform, while I want to update only the current row.
How to do so?
I am using a code like this:
Private Sub Account_Type_AfterUpdate()
Dim strSQL As String
strSQL = "Select Account_Description,Account_ID from Account where
Account_Type='"
strSQL = strSQL & Me!Account_Type.Column(1) & "' order by
Account_Description"
Me!Account_ID.RowSourceType = "Table/Query"
Me!Account_ID.RowSource = strSQL
Me!Account_ID.Requery
End Sub
Thanks in advance.
in a subform I created I want the list of the possible values in a combobox
(Account_ID) to be updated depending on the value selected in another
combobox (Account_Type).
The main problem I am having is that the value is updated in all the rows of
the subform, while I want to update only the current row.
How to do so?
I am using a code like this:
Private Sub Account_Type_AfterUpdate()
Dim strSQL As String
strSQL = "Select Account_Description,Account_ID from Account where
Account_Type='"
strSQL = strSQL & Me!Account_Type.Column(1) & "' order by
Account_Description"
Me!Account_ID.RowSourceType = "Table/Query"
Me!Account_ID.RowSource = strSQL
Me!Account_ID.Requery
End Sub
Thanks in advance.