Cross-tab error

  • Thread starter Thread starter Jerry Crosby
  • Start date Start date
J

Jerry Crosby

I have a form based on a cross-tab query. The query has the potential
possibilities of 3 columns of data. But under some circumstances it may
only have 2 and when that happens, for that 3rd column, I get the "NAME#"
error (because the field I'm calling for doesn't surface in that particular
query).

I'd like to know how to code the form such that if the field doesn't exist
in the query, it just leaves the field blank.

I know I have mutilated this explanation, so feel free to ask a specific
question for clarification (and then return to read my response).

Thanks in advance.

Jerry
 
In the OnOpen or OnCurrent event you could check the value in the box and if
it's "NAME#" then change it to "".
 
Thanks, Alicia, but I couldn't get it to work. That may be because I didn't
know how to code it, but I think it's really because the field isn't
"#NAME?" as it appears. That's the error message, not the field value.
What's happening is that the form is calling for a field that is not in the
field list of the query. Therefore it errors.

Is there a way to code "if [fieldname] doesn't exist in the field list, then
do this..."?

Jerry
 
Back
Top