Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to get Access 2000 Form Tag Values for all forms 1

Status
Not open for further replies.

avolkert

Programmer
Dec 8, 2005
21
US
We use Access 2000 Tag Property to keep track of form versions. I want to compare every form's Tag property with a linked table of form names and latest versions available ... if a later one is available, delete the existing one and reimport the new one from the master ... sounds simple ....

Can someone just send me a MsgBox loop ... I've got the rest figured out already. I was hoping it would be something simple such as:

---------------------
for each FRM in Application.CurrentProject.AllForms
MsgBox FRM.Name & " Tag Property Value is: " & FRM.Tag.Value
Next FRM
---------------------

This obviously doesn't work. Any help is greatly appreciated --- Thanks, Alan


 
Something like this ?
For Each FRM In Application.CurrentProject.AllForms
DoCmd.OpenForm FRM.Name, acDesign, , , , acHidden
MsgBox FRM.Name & " Tag Property Value is: " & Forms(FRM.Name).Tag
DoCmd.Close acForm, FRM.Name
Next FRM

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thank you, Thank you, Thank you ... The answer worked wonderfully.

FYI though ... you can't switch the current form's view in the middle of VB code (fine, this is the update form anyway).

This works wonderfully and very fast too:

For Each FRM In Application.CurrentProject.AllForms
If FRM.Name <> Me.Name Then
DoCmd.OpenForm FRM.Name, acDesign, , , , acHidden
MsgBox FRM.Name & " Tag Property Value is: " & Forms(FRM.Name).Tag
DoCmd.Close acForm, FRM.Name, acSaveNo
End If
Next FRM

I love you man ! ;-x


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top