Control subform on parent current event

I

Ian Smith

I am sure I am missing something here.

I have a parent form and a subform. How can I control the
current record in the subform when the parent record
changes.

For example, with a subform showing a list of events with
a due date and an accomplished date, I want to show the
first event with a null accomplished date in the middle of
the subform.

I don't need guidance on manipulating the recordsetclone
bookmark, just on how to have the parent form's on current
event trigger the action.

Thanks
 
M

Matt Weyland

set the link child field property on the subform equal to
the field on the form that is dictating the subform.

MW
 
I

Ian Smith

That will limit the subform's view to just those records
that satisfy the link specification.

I want to show ALL the relevant records, but position the
subform to the first record with a null date. The user can
then slide up to earlier events, or slide down to see non-
accomplished events further in the future.
 
M

Matt Weyland

This may not be the best way but I know it will work.

Store the value for the date in a global variable in a
module

create a function in a module that gets this date
public function getdate() as string
getdate = strdate
end function

create a query in the QBE will pull in all the required
fields. in the criteria for the date
between #getdate() -7# and #getdate()+7#

This should work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top