JamesMcS
Keyboard-Chair Interface
- Local time
- Today, 09:22
- Joined
- Sep 7, 2009
- Messages
- 1,819
Afternoon everyone! Wondered if you could help me out on this rather simple one...
What I need to do is add a string to the tag property of certain textboxes in certain forms in my DB. How do I say "for each form in currentdb.forms"? Here's what I've got so far:
I'm getting a type mismatch on the currentproject.allforms line. Grr...
What I need to do is add a string to the tag property of certain textboxes in certain forms in my DB. How do I say "for each form in currentdb.forms"? Here's what I've got so far:
Code:
Sub ReTag_Controls()
Dim Frm As Form
Dim ctl As Control
For Each Frm In CurrentProject.AllForms
If InStr(Frm.Name, "Subform") Then
For Each ctl In Frm.Controls
If Not InStr(ctl.Name, "GPD") And Not InStr(ctl.Name, "_") And Not InStr(ctl.Name, "Tagged") And ctl.Type = acTextBox Then
ctl.Tag = ctl.Tag & "No_Export"
End If
Next ctl
End If
Next Frm
End Sub