PDA

Click to See Complete Forum and Search --> : ADO nubee needs help


joey o.
Apr 14th, 2000, 06:22 AM
Hi everyone!
I'm new to Data access and this is my first post into this section of vb-world.I'm trying to open two Access database tables. What I don't know is how to refer to the table names.
I'm trying to enter new information into ResultInfo table(currently very empty)based on selections from RuleInfo table (very full). I have a bunch of rules in RuleInfo table and if they pass or fail test,I want the results to enter into ResultInfo table.I get err 438 (object doesn't support this property or method) on:
Text1 = rs.RuleInfo.RuleNum

Here's the code:

strSQL = "db.OpenRecordset(SELECT ResultInfo.*, RuleInfo.IdNum" & _
" FROM RuleInfo INNER JOIN ResultInfo ON RuleInfo.IdNum = ResultInfo.IdNum;" & _
", dbOpenDynaset)"
Set rs = strSQL

'This only works with one table(when the rs is 1 table):
rs.addItem
text1 = rs!TableItem1
text2 = rs!TableItem2
rs.Update

'I want to do this:
rs.addItem
text1 = rs.ResultInfo.TableItem1
text2 = rs.RuleInfo.TableItem1
rs.Update

Can anyone help me? I'm lost without any other refrences.

Thank You,
Joey O