Chad,
If you have two tables which have the same fields though not a must, you can
use SQL Statement to populate one table from the other. Check out the
following code:
Dim Cn As New ADODB.Connection
Dim SQL As String
If Cn.State <> adStateClosed Then Cn.Close
Cn.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
Info=False;Initial Catalog=DataSourceName;Data Source=MachineName"
SQL = "Insert INTO [FirstTableName] Select [Field1], [Field2],
Field3,...from [SecondTableName] Where [Condition]"
Cn.BeginTrans
Cn.Execute SQL
Cn.CommitTrans
For any query please do not hesitate.
Regards,
Peter MUGOH
-----Original Message-----
From: Chad Ross [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 29, 2004 10:28 PM
To: [EMAIL PROTECTED]
Subject: [Visual Basic 6 programming] Dynamic Table Creation
Hello All,
I am using Visual Basic behind Microsoft Access to dynamically
build a table. What I am doing is filling an array with the field
names. I am using two recordsets to transfer the information. what
I don't know how to do is populate the table I have created. I am
needing to do something like...
rs1!FieldArray(1) = rs2!FieldArray(1)
This will populate the fields rs1 with the values from rs2. I have
tried all different ways including try to set up a field object.
Any suggestions?
Thanks,
Chad
Yahoo! Groups Links
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/k7folB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To reply to this message, go to:
http://groups.yahoo.com/group/visualbasic6programming/post?act=reply&messageNum=18586
Please do not reply to this message via email. More information here:
http://help.yahoo.com/help/us/groups/messages/messages-23.html
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/visualbasic6programming/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/