Re: Cant figure this out !
- From: "German Saer" <gsaer@xxxxxxxxxx>
- Date: Tue, 23 Aug 2005 03:16:54 GMT
Dave,
If you need to modify the record source of a subform query when status
changes, then on the status AfterUpdate event you need to redefine the query
for the subform. By clicking on the status events tab and creating the code
for the redefinition, the code would be something like this:
Procedure Status_AfterUpdate()
SubForm.Form.RecordSource = "SELECT ... FROM ... WHERE Status = " &
Status
End Procedure
Remember to change the name "SubForm" for your actual subform name.
Additionally, if you need to have an initial recordset on the load event of
the main form you can do:
Procedure Form_Load()
Status__AfterUpdate
End Procedure
Hope this helps!
--
________________
German Saer
gsaer@xxxxxxxxxxx
Orlando, FL
"Dave Elliott" <mynotebook@xxxxxxxxxxxxxx> wrote in message
news:u7pOe.148483$gL1.91587@xxxxxxxxxxxxxxxxxxxxxxx
> Ok, will try to simplify. the below code is in my query so that the form
> opens with a status of either active or archived records.
> The form also shows a list of employees and there status is either active
or
> archived.
> I need to be able to show ALL records when the status is archived instead
of
> either active or archived as my choices.
> The below code is in the query for the forms employees list and so shows
> only active or archived records.
> If the form is opened with a status of archived, then I need to see ALL
> records.
> I need to either change record source upon archive status or modify the
> below code to check if the form's status is archived.
>
>
>
> [Forms]![frmAutoPayrollReport]![Status] ' either active or archived is the
> choice here
>
>
.
- References:
- Cant figure this out !
- From: Dave Elliott
- Re: Cant figure this out !
- From: German Saer
- Re: Cant figure this out !
- From: Dave Elliott
- Cant figure this out !
- Prev by Date: Re: Forms restore option
- Next by Date: Re: dMax
- Previous by thread: Re: Cant figure this out !
- Next by thread: Check to see whether or not the record exist before close
- Index(es):
Relevant Pages
|
|