D
DavidW
I have got a form with a record source of a query"gasuse"
on that form is a subform with a recordsoucre of a table"vehicleinfo"
also there is another subform "highmile" with a recordsoucre of another
query"highmile"
all are bound by vehicle;and date
here is the code
If IsNull([Forms]![vehsetusage].highmilesubform!emile) Then
[Forms]![vehsetusage].Vehsetsubform!beginmile = Me.smile
Else
[Forms]![vehsetusage].Vehsetsubform!beginmile =
[Forms]![vehsetusage].highmilesubform!emile
End If
[Forms]![vehsetusage].highmilesubform!emile
has a controlsource of a queryfield named "emile"it is the max of a
different tables return"usage".
All is well when there is data in "usage", but when there is no data in the
table"usage"
The If IsNull([Forms]![vehsetusage].highmilesubform!emile ) statement thinks
that it isnt null and it proceeds to the else segment of the code.
And the If Not IsNull([Forms][vehsetusage].
highmilesubform!emile) prompts and error that emile does not contain any
value?
When emile is empty the query"highmile" is empty
What I am trying to do is assign a value from one table if the max of
another table is empty, then when a different table becomes active to
reassign a value to the same table
Very Confusing
Hope I explained it well
Hope Someone Has an Ideal
on that form is a subform with a recordsoucre of a table"vehicleinfo"
also there is another subform "highmile" with a recordsoucre of another
query"highmile"
all are bound by vehicle;and date
here is the code
If IsNull([Forms]![vehsetusage].highmilesubform!emile) Then
[Forms]![vehsetusage].Vehsetsubform!beginmile = Me.smile
Else
[Forms]![vehsetusage].Vehsetsubform!beginmile =
[Forms]![vehsetusage].highmilesubform!emile
End If
[Forms]![vehsetusage].highmilesubform!emile
has a controlsource of a queryfield named "emile"it is the max of a
different tables return"usage".
All is well when there is data in "usage", but when there is no data in the
table"usage"
The If IsNull([Forms]![vehsetusage].highmilesubform!emile ) statement thinks
that it isnt null and it proceeds to the else segment of the code.
And the If Not IsNull([Forms][vehsetusage].
highmilesubform!emile) prompts and error that emile does not contain any
value?
When emile is empty the query"highmile" is empty
What I am trying to do is assign a value from one table if the max of
another table is empty, then when a different table becomes active to
reassign a value to the same table
Very Confusing
Hope I explained it well
Hope Someone Has an Ideal