> Hi
>
> After some investigation it seems best practice not to store calulated
> variables, and I
> can't seem to do it either, but rather to recalculate them. This however
> is
> posing a little
> frusting dilemma for me.
>
> I have a single form(Vesselcapturing) which reads and displays data from a
> table(tblTFCMASTER)to the end user fot editing. If the user edits/updates
> a
> record I need to
> be aware of this, as this newly updated record must be displayed in other
> forms and be exported to excel. Currently I have a check box(TEST) which
> is
> manually changed to True by
> the user upon completion of the editing.This state of the check box is
> then
> saved to
> tblTFCMASTER. Since in its aletered state I can filter on it (TEST =
> True).
>
> For the exporting of the data to excel I have a query that is exported to
> excel. Therefore
> filtering here is no problem.I also need to filter in 3 other forms(e.g
> frmDOC). I have an on load event filter which does the
> job:
>
> Me.Filter = "TEST = True"
> Me.FilterOn = True
>
> This entire scenario functions perfectly but obviosuly it would be better
> if
> the end user
> does not have to manually check the check box but rather have a
> expression/formula that
> would automate it based on updated values in other fileds in the
> Vesselcapturing form.
>
> So here are my thoughts on automating the process(which isn't working):
>
> In the other forms and the query an if statement can be placed which will
> change the status
> of the TEST checkbox.
>
> eg.possable statements
>
> EXP 1.
> expression in the control source of TEST field:
> =IIf([DATEARRIVE]>#01/01/2008#,Yes,No)
>
> [This changes the status of the check box for each individaul record and
> works]
>
> EXP 2.
> expression in the on open event
> =IIf([DATEARRIVE]>#01/01/2008#,[TEST]=True,[TEST]=False)
>
> [this is supposed to change the status of the check box,but doesn't work]
>
> EXP3.
> vb code in the on open event
>
> If [DATEARRIVE] > #1/1/2008# Then
> [TEST] = True
> Else
> [TEST] = False
> End If
>
> [this is supposed to change the status of the check box, TEST has no
> control
> source, this
> statement however does not differentiate between the records>it changes
> all
> the records TEST
> value based upon the 1st records DATEARRIVE]
>
> Now the question is where would I place an if statement/expression since
> if I
> place EXP1 in
> the control source the filter does not pick up the change since on load it
> is
> still false.
> My thoughts were on placing EXP2 or EXP3 on the on open event and leave
> the
> filter on the on
> load event, so as to 1st change the status of the check box before the
> filter
> is fired.
> However neither EXP2 or EXP3 function properly.
>
> any suggestions/ correction would be well appreciated:)
> Regards
> Philip
>
> --
> Message posted via AccessMonster.com
>
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200811/1>