J
johnlute
I've been struggling with a problem for a couple days now and am on
the verge of resolving it - I think. I hope you can help get me over
the hump!
I have a form with a query record source. It has an alias with the
expression:
IDAreasq: IIf([IDWdia]="ID Diameter",Null,IIf([IDLength]+[IDWidth]+
[IDHeight],Null,IIf(IsNull([IDLength])+IsNull([IDWidth])+IsNull
([IDHeight]) In (0,-1),Nz([IDLength],1)*Nz([IDWidth],1)*Nz([IDHeight],
1),Null)))
The form is filled in real time therefore this alias will populate
with a numeric value given the expression. If the expression returns a
numeric value then I want certain controls on the form to be enabled.
If the expression doesn't return a numeric value then I want those
same controls on the form to be disabled.
After much fiddling and other help on this newsgroup I've arrived at:
Me.IDAreasqinmin.Enabled = Not Len(Me.IDAreasq & vbNullString) <= 0
This is placed in the form's OnCurrent Event and works ONLY when I
enter a new record and then save it by navigating from the record and
then returning to it. I want to be able to enter values into
Me.IDAreasqinmin (and other fields not mentioned here) "on the fly"
Is this possible to resolve?
the verge of resolving it - I think. I hope you can help get me over
the hump!
I have a form with a query record source. It has an alias with the
expression:
IDAreasq: IIf([IDWdia]="ID Diameter",Null,IIf([IDLength]+[IDWidth]+
[IDHeight],Null,IIf(IsNull([IDLength])+IsNull([IDWidth])+IsNull
([IDHeight]) In (0,-1),Nz([IDLength],1)*Nz([IDWidth],1)*Nz([IDHeight],
1),Null)))
The form is filled in real time therefore this alias will populate
with a numeric value given the expression. If the expression returns a
numeric value then I want certain controls on the form to be enabled.
If the expression doesn't return a numeric value then I want those
same controls on the form to be disabled.
After much fiddling and other help on this newsgroup I've arrived at:
Me.IDAreasqinmin.Enabled = Not Len(Me.IDAreasq & vbNullString) <= 0
This is placed in the form's OnCurrent Event and works ONLY when I
enter a new record and then save it by navigating from the record and
then returning to it. I want to be able to enter values into
Me.IDAreasqinmin (and other fields not mentioned here) "on the fly"
Is this possible to resolve?