M
markv
The message below was posted in the forms area, but I
thought it might be more appropriate to post it in the
forms coding area. Thanks for any suggestions
MarkV
==========================
I have an unbound form with a combo box and a subform on
it. I use the combo box to select a customer and the
subform displays all customer order information. I have
it linked correctly with one small glitch.
When I select a customer with 10 orders all 10 orders show
properly in the subform. When I now select a new customer
with only 5 orders, the 5 orders show correctly but the
record pointer is at record #6. The record pointer is
trying to point to record #10 (the previous selection) but
since there are only 5 it moves to the new entry (blank)
record at the end of the data set (#6).
How can I force the subform to always show record #1 as I
make new selections in combobox regardless of how many
records are in the subform?
Thanks for any help
Mark
Thanks Kevin, that works if I tab into (enter)the
subform. Is it possible to achieve the same result by
using the after update event in the combo box (i.e.
without having to tab into the subform?
I tried a few techniques like using bookmarks and
recordset clones but was unable to get the syntax correct.
Thanks for any further ideas
MarkV
thought it might be more appropriate to post it in the
forms coding area. Thanks for any suggestions
MarkV
==========================
I have an unbound form with a combo box and a subform on
it. I use the combo box to select a customer and the
subform displays all customer order information. I have
it linked correctly with one small glitch.
When I select a customer with 10 orders all 10 orders show
properly in the subform. When I now select a new customer
with only 5 orders, the 5 orders show correctly but the
record pointer is at record #6. The record pointer is
trying to point to record #10 (the previous selection) but
since there are only 5 it moves to the new entry (blank)
record at the end of the data set (#6).
How can I force the subform to always show record #1 as I
make new selections in combobox regardless of how many
records are in the subform?
Thanks for any help
Mark
=========================================================================================================
Hi, Mark.
Having just solved the exact opposite issue, i.e., going
to a new record, try:
DoCmd.GoToRecord , , acFirst
in the On Enter event of the subform control.
HTH
Kevin Sprinkel
Thanks Kevin, that works if I tab into (enter)the
subform. Is it possible to achieve the same result by
using the after update event in the combo box (i.e.
without having to tab into the subform?
I tried a few techniques like using bookmarks and
recordset clones but was unable to get the syntax correct.
Thanks for any further ideas
MarkV