Thanks... Now one additional question...
I am having problems with your syntax and maybe the fact that the controls I
am trying to set are on a subform as opposed to being on the current form...
Here is the syntax I am using...
Forms![frmPricing]![frmMenuItems].Form.RS!ItemControlName.Enabled = True
where "frmPricing" is the main form, "frmMenuItems" is the subform and
RS!ItemControlName is the DB fieldname containing the name of the control.
When I run the code I get an "Application-defined or object-defined error".
In debug, if I substitute the RS!ItemControlName with the actual field
name - it works fine. It appears that it is not obtaining the actual
controls name from RS!ItemControlName and substituting it into the command
syntax properly...
Any ideas on this one?
Thanks,
Brad
Rob Oldfield said:
dim db as database
dim rs as recordset
set db=currentdb
set rs=db.openrecordset("TableName")
rs.movefirst
do while not rs.eof
me(rs!FieldName).enabled=true
rs.movenet
loop
rs.close
set db=nothing