assuming your table of form names is called tblForms, and the field holding
the form names is called FormName, try something along the following lines,
as
Dim rst As DAO.Recordset, str As String
Set rst = CurrentDb.OpenRecordset("tblForms", dbOpenDynaset)
rst.MoveFirst
Do
str = rst("FormName")
DoCmd.OpenForm str, acDesign
Forms(str).cmdClose.Picture = "I:\Bid Administration\bids.ico"
DoCmd.Close acForm, str, acSaveYes
rst.MoveNext
Loop Until rst.EOF
rst.Close
Set rst = Nothing
hth
> How would I rework this code so that I can use variables with it?
>
[quoted text clipped - 6 lines]
>
> Crystal