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
|
|||
|
|||
Combobox Based on Recordset..
I am using an combobox based on a recordset (adOpenDynamic,
adLockBatchOptimistic) and populating it on FORM LOAD Set cboName.Recordset = rsTemp I make an entry to the table on which this recordset is based through SQL Statement. After this I requery my combobox cboName.Requery But I do not see the newly added record here. I have to close the form and reopen it again to see the new record. I have also tried requerying the recordset on which the combobox is based, before requering the combobox..But didn't work ? Please advise on this. |
#2
|
|||
|
|||
Combobox Based on Recordset..
If you are adding new records through the form, you have to requery the form.
" wrote: I am using an combobox based on a recordset (adOpenDynamic, adLockBatchOptimistic) and populating it on FORM LOAD Set cboName.Recordset = rsTemp I make an entry to the table on which this recordset is based through SQL Statement. After this I requery my combobox cboName.Requery But I do not see the newly added record here. I have to close the form and reopen it again to see the new record. I have also tried requerying the recordset on which the combobox is based, before requering the combobox..But didn't work ? Please advise on this. |
#3
|
|||
|
|||
Combobox Based on Recordset..
Thanks Klatuu, I tried that. But it didn't work. The temporary solution I found out is setting the combobox's recordset everytime with a new recordset, wherever I have to requery. But its not a good method and very resource heavy too. Anybody's got a better solution than this ? Regards, Anand |
#4
|
|||
|
|||
Combobox Based on Recordset..
|
#5
|
|||
|
|||
Combobox Based on Recordset..
I don't believe I read your original post correctly. First this is, a combo
box has no recordset. It does have a row source. This line Set cboName.Recordset = rsTemp Is not correct. It should be Me.cboName.RowSource = ??? It would not be the name of an open recordset, but either an SQL statement or stored query that retrieves the data you need. " wrote: Thanks Klatuu, I tried that. But it didn't work. The temporary solution I found out is setting the combobox's recordset everytime with a new recordset, wherever I have to requery. But its not a good method and very resource heavy too. Anybody's got a better solution than this ? Regards, Anand |
Thread Tools | |
Display Modes | |
|
|