Need help getting started with a Recordset

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DLN
    New Member
    • Apr 2007
    • 26

    Need help getting started with a Recordset

    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
  • DLN
    New Member
    • Apr 2007
    • 26

    #2
    Well I figured out what I needed to do. Here is the code I used if anyone should have the same problem

    Code:
    Dim rst As DAO.Recordset, rst3 As DAO.Recordset, rst4 As DAO.Recordset, rst5 As DAO.Recordset
    Dim db As Database, rst2 As DAO.Recordset
    Dim counter As Integer
    Dim strSearchName As String
    
    Set rst = Me.Recordset
    Set db = CurrentDb
    Set rst2 = db.OpenRecordset("tblProducts", dbOpenDynaset)
    Set rst3 = db.OpenRecordset("tblDataTypes", dbOpenDynaset)
    Set rst4 = db.OpenRecordset("tblContentReview", dbOpenDynaset)
    Set rst5 = db.OpenRecordset("tblDomains", dbOpenDynaset)
    
        strSearchName = CStr(Me!ProductID)
    
        rst2.FindFirst "ProductID = " & strSearchName
        If rst2.NoMatch = False Then
            MsgBox "Record found"
    
    etc:

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32633

      #3
      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 :(

      Comment

      Working...