L
Lee
Hi everyone,
I'm sure this is me being dim but I can't see why the
following doesn't work. All I want is for the focus to
return to the current record (within an unbound listbox)
once an update query has been run. The form's record
source is different to the listbox by the way.
Dim intCentre As Integer
intCentre = txtCentreNo (this textbox holds the same
value as the bound column of the listbox - a five digit
number)
DoCmd.Echo False
DoCmd.SetWarnings False
DoCmd.OpenQuery "qry_UpdateAllocation"
DoCmd.SetWarnings True
DoCmd.SelectObject acForm, "frm_Allocations"
DoCmd.Requery
DoCmd.GoToControl "lstCentres"
DoCmd.Requery "lstCentres"
DoCmd.FindRecord intCentre, acEntire, False,
acSearchAll, True, acCurrent, True
DoCmd.Echo True
Should I be using a recordset bookmark instead? If so,
how do I do this when the listbox's record source is
different to that of the form? I'm a newbie (no,
really!!?) so would appreciate a more detailed reply in
words of one syllable.
Thanks in advance
Lee
I'm sure this is me being dim but I can't see why the
following doesn't work. All I want is for the focus to
return to the current record (within an unbound listbox)
once an update query has been run. The form's record
source is different to the listbox by the way.
Dim intCentre As Integer
intCentre = txtCentreNo (this textbox holds the same
value as the bound column of the listbox - a five digit
number)
DoCmd.Echo False
DoCmd.SetWarnings False
DoCmd.OpenQuery "qry_UpdateAllocation"
DoCmd.SetWarnings True
DoCmd.SelectObject acForm, "frm_Allocations"
DoCmd.Requery
DoCmd.GoToControl "lstCentres"
DoCmd.Requery "lstCentres"
DoCmd.FindRecord intCentre, acEntire, False,
acSearchAll, True, acCurrent, True
DoCmd.Echo True
Should I be using a recordset bookmark instead? If so,
how do I do this when the listbox's record source is
different to that of the form? I'm a newbie (no,
really!!?) so would appreciate a more detailed reply in
words of one syllable.
Thanks in advance
Lee