![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I've got a continuous form with a bound combo box (suffix) the rowsource for the cb is "SELECT * *FROM qryQuoteBookingDetailSuffix WHERE quoteId = 34" which returns one record ('A') the cb is bound to a field that is used within qryQuoteBookingDetailSuffix so that my list should only display the suffixes that haven't yet been choosen so if I choose that 'A' in the first record of the continous form, I'd expect the second record on the continuous form to show an empty list for the cb, but this list still contains the one record ('A') if I put STOP in the gotFocus() event of the cb, and I run the above in a query within 'query design' it correctly returns no records if in the gotFocus() event I do * strsql = suffix.rowsource * set rs = currentdb.openrecordset(strSql) * suffix.rowsource = strsql rs.eof is true suffix.Recordset.eof is false and I still get a list with one record 'A'... why ? and what can I do with cb's rowsource to show an empty list once 'A' is selected ? the best I can do for now, in the form's beforeUpdate event, is try to detected if 'A' has already been chosen |
#3
| |||
| |||
|
|
On Nov 22, 9:39*am, Roger <lesperan... (AT) natpro (DOT) com> wrote: I've got a continuous form with a bound combo box (suffix) the rowsource for the cb is "SELECT * *FROM qryQuoteBookingDetailSuffix WHERE quoteId = 34" which returns one record ('A') the cb is bound to a field that is used within qryQuoteBookingDetailSuffix so that my list should only display the suffixes that haven't yet been choosen so if I choose that 'A' in the first record of the continous form, I'd expect the second record on the continuous form to show an empty list for the cb, but this list still contains the one record ('A') if I put STOP in the gotFocus() event of the cb, and I run the above in a query within 'query design' it correctly returns no records if in the gotFocus() event I do * strsql = suffix.rowsource * set rs = currentdb.openrecordset(strSql) * suffix.rowsource = strsql rs.eof is true suffix.Recordset.eof is false and I still get a list with one record 'A'... why ? and what can I do with cb's rowsource to show an empty list once 'A' is selected ? the best I can do for now, in the form's beforeUpdate event, is try to detected if 'A' has already been chosen I don't understand your problem. *Are you saying that if you select something from a combo in a continuous form all records for that column display the same result? If that is the issue, change the Combo to a text box. *On a dbl-click event create/call a small form that you would pass the id to filter on and present a combo and OK/Cancel buttons. *This form updates the column field in the continuous form when closed. .- Hide quoted text - - Show quoted text - |
#4
| |||
| |||
|
|
so I don't understand why the dropdown list isn't empty, and how to make it so |
#5
| |||
| |||
|
|
so I don't understand why the dropdown list isn't empty, and how to make it so You need to requery the combo box to get it to reset the rowsource. Do this in the On Current event of each record: Me.MyCombobox.Requery Neil |
#6
| |||
| |||
|
| "Roger" <lesperancer (AT) natpro (DOT) com> wrote |
|
so I don't understand why the dropdown list isn't empty, and how to make it so You need to requery the combo box to get it to reset the rowsource. Do this in the On Current event of each record: Me.MyCombobox.Requery Neil |
#7
| |||
| |||
|
|
"Roger" <lesperan... (AT) natpro (DOT) com> wrote in message news:f1894df9-edba-40f9-9f9e-b0685578036c (AT) y7g2000vbe (DOT) googlegroups.com... On Nov 22, 7:20 pm, "Neil" <neil.ginsberg+newsgr... (AT) gmail (DOT) com> wrote: so I don't understand why the dropdown list isn't empty, and how to make it so You need to requery the combo box to get it to reset the rowsource. Do this in the On Current event of each record: Me.MyCombobox.Requery Neil but shouldn't that also work if I do cb.requery in the cb_gotFocus() event, because it doesn't Are you saying it works in the form_current event, but doesn't work in the cb_gotFocus event? Or that it doesn't work in either event? |
#8
| |||
| |||
|
| "Roger" <lesperancer (AT) natpro (DOT) com> wrote |
|
"Roger" <lesperan... (AT) natpro (DOT) com> wrote in message news:f1894df9-edba-40f9-9f9e-b0685578036c (AT) y7g2000vbe (DOT) googlegroups.com... On Nov 22, 7:20 pm, "Neil" <neil.ginsberg+newsgr... (AT) gmail (DOT) com> wrote: so I don't understand why the dropdown list isn't empty, and how to make it so You need to requery the combo box to get it to reset the rowsource. Do this in the On Current event of each record: Me.MyCombobox.Requery Neil but shouldn't that also work if I do cb.requery in the cb_gotFocus() event, because it doesn't Are you saying it works in the form_current event, but doesn't work in the cb_gotFocus event? Or that it doesn't work in either event? |
![]() |
| Thread Tools | |
| Display Modes | |
| |