Do you know how I can rewrite lines 17 and 19 to work?
strSubFormName As String Dim strFormAddress as String Private Sub cmdCreatePO_Click() strSubFormName = ("Form_fsubPOLines") strFormAddress = ("Forms!frmPO.fraPOLines.Form") Call CreatePO End Sub Private Sub CreatePO Dim frmLines as strSubFormName 'How do I do this as a variable? Dim frmLines as Form_fsubPOLines works. Set frmLines = strFormAddress 'How do I do this as a variable? Set frmLines = Forms!frmPO.fraPOLines.Form works. Do Until rsSourceLines.EOF frmLines.Recordset.AddNew frmLines.cboSOLinesID = rsSourceLines!SOLinesID frmLines.lngUnitQuantity = rsSourceLines!lngSelectedQuantity frmLines.UnitsID = rsSourceLines!UnitsID frmLines.cboSOLinesID_AfterUpdate frmLines.Dirty = False rsSourceLines.MoveNext Loop End Sub
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.