Nope!
General syntax for altering a controls visible property (controls are "things" on forms):
[tt]Me!txtItem1.Visible = True[/tt]
- which is one control
You might use if - then - else (if) constructs, select case to match your requirements, toggling each individual control (remember both visible = true AND false for each control), but also I think you could tweak it by using the controls collection, perhaps something like this:
[tt]dim ctl as control
for each ctl in me.controls
if ctl.controltype = actextbox then
if mid$(ctl.name, 1, 7) = "txtItem" then
if mid$(ctl.name, 8) <= me!txtNumber.Value then
ctl.visible = true
else
ctl.visible = false
end if
end if
end if
next ctl[/tt]
- note - typed not tested
This could be called from the txtNumber's after update event, and perhaps also the on current event of the form.
Roy-Vidar