By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,705 Members | 1,795 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,705 IT Pros & Developers. It's quick & easy.

Determining Field Type and Loops

P: n/a
Huy
Hi,

I'm relatively new to access and was looking for a way to make a
button to format each textbox, and only textboxes to change thier
background to yellow. I have created the menu bar button and decided
that at "for each ctrl" is the most appropriate. I just don't know how
to search each item in the active form for thier property type to
check if it is a text box.

Any information would be great.

Thanks
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Huy" <il*******@nart.ca> wrote in message
news:44**************************@posting.google.c om...
Hi,

I'm relatively new to access and was looking for a way to make a
button to format each textbox, and only textboxes to change thier
background to yellow. I have created the menu bar button and decided
that at "for each ctrl" is the most appropriate. I just don't know how
to search each item in the active form for thier property type to
check if it is a text box.

Any information would be great.

Thanks

Perhaps use a structure like this:

For Each ctl In frm.Controls

With ctl

Select Case .ControlType

Case acLabel

Case acTextBox

Case acComboBox

Case acCheckBox

End Select

End With

Next ctl

Fletcher
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.