By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,404 Members | 1,873 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,404 IT Pros & Developers. It's quick & easy.

Need help getting started with a Recordset

P: 26
I always have trouble getting started creating a Recordset for some reason.

I've created a Query that takes data from three tables Table1, Table2 and Table 3 and creates a MasterTable.

I have a form that is used to update the MasterTable.

Now I need to push the data back to Table1, Table2, and Table3

Any Suggestions?

Thanks.

DLN
May 17 '07 #1
Share this Question
Share on Google+
2 Replies


P: 26
DLN
Well I figured out what I needed to do. Here is the code I used if anyone should have the same problem

Expand|Select|Wrap|Line Numbers
  1. Dim rst As DAO.Recordset, rst3 As DAO.Recordset, rst4 As DAO.Recordset, rst5 As DAO.Recordset
  2. Dim db As Database, rst2 As DAO.Recordset
  3. Dim counter As Integer
  4. Dim strSearchName As String
  5.  
  6. Set rst = Me.Recordset
  7. Set db = CurrentDb
  8. Set rst2 = db.OpenRecordset("tblProducts", dbOpenDynaset)
  9. Set rst3 = db.OpenRecordset("tblDataTypes", dbOpenDynaset)
  10. Set rst4 = db.OpenRecordset("tblContentReview", dbOpenDynaset)
  11. Set rst5 = db.OpenRecordset("tblDomains", dbOpenDynaset)
  12.  
  13.     strSearchName = CStr(Me!ProductID)
  14.  
  15.     rst2.FindFirst "ProductID = " & strSearchName
  16.     If rst2.NoMatch = False Then
  17.         MsgBox "Record found"
  18.  
  19. etc:
May 18 '07 #2

NeoPa
Expert Mod 15k+
P: 31,494
DLN,
Thanks for posting your solution.
I wasn't clear if the query you were talking about was an UPDATE query or a SELECT query :(
Jun 2 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.