If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Requery of a single row in a subform
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. |
#2
|
|||
|
|||
Hello Loris.
"Loris" wrote: 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? Not at all, because if you change an "unbound property" (other than the value) of a control in a continuous form, this affects "the control" whitch is the same in all rows of the form. 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 You could try to change the RowSource of the second combo also every time the user moves to another record, that is in the "current" event of the subform. -- Regards, Wolfgang |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Form, Subform, Tab key | 2nd_Stage_User | Using Forms | 17 | August 25th, 2006 12:30 AM |
Requery method for combobox on subform | dgreen | Using Forms | 3 | July 1st, 2005 07:14 PM |
Requery Subform A from Subform B | Robert_L_Ross | Using Forms | 6 | June 24th, 2005 12:11 AM |
Requery(?) subform records | Dave | General Discussion | 1 | May 19th, 2005 06:26 AM |
dlookup | miaplacidus | Using Forms | 9 | August 5th, 2004 09:16 PM |