F
Fr@nk
Hi. I have a form (subform, actually) that fires code when the user
double-clicks a line in a listbox. The code opens up another form, and
filters based on the line (record) the user double-clicked on in the first
window. Usually, the recordset for the second form is one or two records,
and the navigation controls show this. So far, so good.
How can I (in my code) not only filter the opening up of the second form,
but then, if there are more than one records displayed in the "new" form,
have the form display a specific one (which will have a match to the listbox
line the user originally clicked on)? Right now, when the new form is
displaying multiple records (correctly), it displays what appears to be the
last record usually. If the user had double-clicked a different listbox line
(to get the new form to open), this may or may not be the correct record
displayed. The user must navigate to the correct record.
I know this sounds confusing, but my question is pretty simple I think: I
have the right recordset for my newly-displayed form (via the filter,
applied in the code); I just need to know how to _display_ a particular
record in that form's recordset, without the user having to navigate to it.
Can I do a Find (based on a criteria I can easily specify in the code), get
that record's ID, then tell the form to display the record (docmd.goto?)
with that ID? If so, what's the syntax for that? Thanks.
F
double-clicks a line in a listbox. The code opens up another form, and
filters based on the line (record) the user double-clicked on in the first
window. Usually, the recordset for the second form is one or two records,
and the navigation controls show this. So far, so good.
How can I (in my code) not only filter the opening up of the second form,
but then, if there are more than one records displayed in the "new" form,
have the form display a specific one (which will have a match to the listbox
line the user originally clicked on)? Right now, when the new form is
displaying multiple records (correctly), it displays what appears to be the
last record usually. If the user had double-clicked a different listbox line
(to get the new form to open), this may or may not be the correct record
displayed. The user must navigate to the correct record.
I know this sounds confusing, but my question is pretty simple I think: I
have the right recordset for my newly-displayed form (via the filter,
applied in the code); I just need to know how to _display_ a particular
record in that form's recordset, without the user having to navigate to it.
Can I do a Find (based on a criteria I can easily specify in the code), get
that record's ID, then tell the form to display the record (docmd.goto?)
with that ID? If so, what's the syntax for that? Thanks.
F