Private Sub cmdsummery_Click()

Set wss = DBEngine.Workspaces(0)
Set dbs = wss.OpenDatabase("Gagedetails.mdb")
Set rss = dbs.OpenRecordset("tblGage")
'Set rss1 = dbs.OpenRecordset("tblopeName")

Do While Not rss.EOF

     OSQL = "SELECT DISTINCT OpeName1 FROM tblGage WHERE Date =" & SQLDate(txtdate.Text)
     Set rss = dbs.OpenRecordset(OSQL)
     MSQL = rss("OpeName1")
     NSQL = "INSERT INTO tblOpeName (name)" & " values (" & MSQL & ")"
     Set rss = dbs.OpenRecordset(NSQL)
     rss.MoveNext
Loop

rss.Close
Set rss = Nothing
End Sub

When i tried to run this got a Error code runtime error 3219
plz help

because different database has different error code and description, pls state which database and version that u use
U can also try to find the description of that error in the documentation

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.