Freshman
Registered User.
- Local time
- Today, 22:22
- Joined
- May 21, 2010
- Messages
- 437
Hi all,
Not sure how I'm going to explain this problem but I've got a form based on a crosstab query which result gives me a number of data fields which I then refer to in the form.
Depending on the resulting data of the query some fields exist and others not. I have no way of knowing which will and will not before hand.
On the Open event I set each field to the control irrespective it they exist in the query or not.
eg:
Me.Ctl01.ControlSource = "01"
Me.Ctl02.ControlSource = "03"
Me.Ctl03.ControlSource = "03"
etc
The problem is that I'm getting #Name in the fields that don't have any bound control.
I've tried all the functions I know eg: IsNull, IsEmpty, IsError etc but no trick will do.
Any idea on resolving this.
In otherwords I only want to set the control source of a particular field if the control does indeed exist.
Thanks
Pierre
Not sure how I'm going to explain this problem but I've got a form based on a crosstab query which result gives me a number of data fields which I then refer to in the form.
Depending on the resulting data of the query some fields exist and others not. I have no way of knowing which will and will not before hand.
On the Open event I set each field to the control irrespective it they exist in the query or not.
eg:
Me.Ctl01.ControlSource = "01"
Me.Ctl02.ControlSource = "03"
Me.Ctl03.ControlSource = "03"
etc
The problem is that I'm getting #Name in the fields that don't have any bound control.
I've tried all the functions I know eg: IsNull, IsEmpty, IsError etc but no trick will do.
Any idea on resolving this.
In otherwords I only want to set the control source of a particular field if the control does indeed exist.
Thanks
Pierre