Weird Behavior-Maybe Not

  • Thread starter Thread starter DS
  • Start date Start date
D

DS

I have a form,based on Query that gets opened from another form. I'm
filling in bound fields from the first form. As an experiment I took
some fields off of the second form, ran the code and guess what the
fields still got filled in even though they are no longer on the form!
Could this be possible?
Thanks
DS
 
It depends on your syntax, but if the fields are still in the form's
recordset, you may be able to get them whether or not there are controls on
the form for those fields. Reports however, are a little pickier. You
usually will need a control bound to the field to get the code the refers to
it to work properly, so you usually just set the control's visible property
to false/no to hide it.
 
Wayne said:
It depends on your syntax, but if the fields are still in the form's
recordset, you may be able to get them whether or not there are controls on
the form for those fields. Reports however, are a little pickier. You
usually will need a control bound to the field to get the code the refers to
it to work properly, so you usually just set the control's visible property
to false/no to hide it.
It seems that I am getting them, but is this legal? Will it come back
and bite me down the road?
Thanks
DS
 
It shouldn't be a problem. If the fields are in the form's recordset, they
should always be available. Where the problem could come in would be if you
looked at the form and didn't see the field in use so you remove it from the
query feeding the form. At that point the code would break.
 
Back
Top