First thank you to Martin Liss for all the help and to the other who have replied to my other threads.
I am using mdi child forms. each is a copy of the original.
I have a database with a formatted table.
on each creation of a new child form I create a new table. This new child form should point to the new table. I am using a data control Data1 and a DBGrid control.
Each table/form represents an electrical panel schedule.
My problem is that each mdi form is pointing to the original data table.
any input will be appreciated.
how can I get this to work if the panel name has a space in it?Code:Private Sub LoadNewDoc() 'table2 is a template table. each child form should point 'to a new table with a name=to the caption of the child form Dim frmD As frmDocument Dim StrTemp As String 'name of panel Set frmD = New frmDocument 'create a child form based on the model StrTemp = InputBox("enter Panel Name", "Panel Name?") 'Get name for this panel frmD.Caption = StrTemp 'set child window caption to the panel name Call CopyTable("c:\test\db1.mdb", "table2", StrTemp) 'copy table 2 to the name of the panel frmD.Data1.RecordSource = StrTemp 'try to get the new mdi form to point to the new table frmD.Show 'show the user what they've won! End Sub
thank you for your time and have a good day





Reply With Quote