Expressions on forms - limit?

J

JamesSF

is there a limit in A2k2 on number of expression text boxes allowed on a
form?

I have 10 text boxes with a simple iif statement like this:
=IIf([ysnLine1]=0,"No","Yes")
so 1 text box for each of 10 lines

the 10th one and further always says #Name i can delete the ysnLine1 box
and the ysnLine10 one shows up with data. if i copy and paste one, all
subsequent text boxes show #Name.

the record source is a table with 1 row and 14 columns. this a checklist
form that has a check box bound to the table and an unbound text box next to
it to say yes or no as a competed status.

It just will not show 10 unbound expressions at a time.

Any ideas?

Thanks
James SF
 
M

Marshall Barton

JamesSF said:
is there a limit in A2k2 on number of expression text boxes allowed on a
form?

I have 10 text boxes with a simple iif statement like this:
=IIf([ysnLine1]=0,"No","Yes")
so 1 text box for each of 10 lines

the 10th one and further always says #Name i can delete the ysnLine1 box
and the ysnLine10 one shows up with data. if i copy and paste one, all
subsequent text boxes show #Name.

the record source is a table with 1 row and 14 columns. this a checklist
form that has a check box bound to the table and an unbound text box next to
it to say yes or no as a competed status.

It just will not show 10 unbound expressions at a time.


Unless you have some kind of corruption in your db, that's a
new one on me.

You might want to try eliminating the expression altogether
by setting the text box's control source to just the field
in the table and setting its Format property to Yes/No.
 
R

Reggie

I agree with Marshall. If you insist though does make sure the ysnLine10
and above control/fields are on your form and that the name of the control
is the same as the one you are referencing? In other words if you have:
=IIf([ysnLine11]=0,"No","Yes")
make sure you have the field/control with the name ysnLine11 on your form.

Other then that I just did a test as you described and it worked form me.
--
Reggie

www.smittysinet.com
----------
Marshall Barton said:
JamesSF said:
is there a limit in A2k2 on number of expression text boxes allowed on a
form?

I have 10 text boxes with a simple iif statement like this:
=IIf([ysnLine1]=0,"No","Yes")
so 1 text box for each of 10 lines

the 10th one and further always says #Name i can delete the ysnLine1 box
and the ysnLine10 one shows up with data. if i copy and paste one, all
subsequent text boxes show #Name.

the record source is a table with 1 row and 14 columns. this a checklist
form that has a check box bound to the table and an unbound text box next to
it to say yes or no as a competed status.

It just will not show 10 unbound expressions at a time.


Unless you have some kind of corruption in your db, that's a
new one on me.

You might want to try eliminating the expression altogether
by setting the text box's control source to just the field
in the table and setting its Format property to Yes/No.
 
T

Tim Ferguson

I have 10 text boxes with a simple iif statement like this:
=IIf([ysnLine1]=0,"No","Yes")
so 1 text box for each of 10 lines

They are not being referenced programmatically, are they, with a line like

Dim strControlName As String(8)

strControlName = "ysnLine" & wCounter

bValue = me.Controls(strControlName).Value


because that will fail when wCounter>9

Just a thought...


Tim F
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top