DoCmd.OpenForm "SampleForm", acDesign a = 0 b=0 Do Set cmd = CreateControl(b, acCommandButton) cmd.Name = "Custom " & a cmd.Caption = "Customize " & a cmd.OnClick = "[Event Procedure]" InsertCode = Forms![SampleForm].Module.CreateEventProc("Click", cmd.Name) b=b+1 a = a + 1 rst.MoveNext count = count - 1 Loop While (count > 0) DoCmd.Close acForm, "SampleForm", acSaveYes
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.