P
PowerPoint Jedi
Hi,
I am having a problem with some code I wrote for a form. This seems to
be a 2 part problem.
The first part is that when the form it runs a query to populate the fields
on the form. If there are no records meeting the criteria the form doesn't
populate and you just see the grey background. This in itself is not a
problem as there are situations when there are going to be no records meeting
the criteria
The second part is where I am having issues. I am wrote code to correspond
to the onclose event. This code checks a certain field to determine if it
should perform a function. When the above query returns no values and I
close the form I get a runtime error stating that the field it is looking for
has no value.
I understand why this is happening but have no idea how to get around it.
It looks like I need a way in the onclose event to check first if there were
values returned in the initial query prior to running the function. If this
is the case I need to be able to just close the form skipping the function
and not getting the runtime error.
Any ideas? If you are confused please post questions and I will do my best
to clear up the confusion
Thanks you
I am running access 2003
I am having a problem with some code I wrote for a form. This seems to
be a 2 part problem.
The first part is that when the form it runs a query to populate the fields
on the form. If there are no records meeting the criteria the form doesn't
populate and you just see the grey background. This in itself is not a
problem as there are situations when there are going to be no records meeting
the criteria
The second part is where I am having issues. I am wrote code to correspond
to the onclose event. This code checks a certain field to determine if it
should perform a function. When the above query returns no values and I
close the form I get a runtime error stating that the field it is looking for
has no value.
I understand why this is happening but have no idea how to get around it.
It looks like I need a way in the onclose event to check first if there were
values returned in the initial query prior to running the function. If this
is the case I need to be able to just close the form skipping the function
and not getting the runtime error.
Any ideas? If you are confused please post questions and I will do my best
to clear up the confusion
Thanks you
I am running access 2003