Is there a way to pass the key to a form (and use it to set the records available in the opened form) in ADO style? All the solutions I've seen (Including the help in Access) require the old DAO references and libraries.
Please excuse my symantics. If everything is still DAO, why do I have to go check the 3.x library to use it? I'm not being a smart___, just confused. I've been suffering through MS changes from Access 2 on up!
Because in the 2000 and 2002 version, DAO wasn't among the default libraries, and had/has to be selected/checked if the need to use DAO arises. Perhaps an attempt to force more developers into using ADO? In 2003 it is again default, together with ADO (and the rest).
When I use OpenArgs to control the records available on a form I don't go anywhere near anythink I'd call either DAO or ADO is I'm a bit confused about what you mean.
G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.
Here's the event for the receiving form. (Other code is required to handle new (filtered) records.)
Private Sub Form_Open(Cancel As Integer)
If Not IsNull(Me.OpenArgs) Then
Dim InID As Integer
Dim SQLwhere As String
Dim RS As DAO.Recordset
Set RS = Me.RecordsetClone
InID = Me.OpenArgs
RS.FindFirst "abcid = " & InID
If Not RS.NoMatch Then
Me.Bookmark = RS.Bookmark
End If
SQLwhere = "abcid = " & InID
DoCmd.ApplyFilter , SQLwhere
End If
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.