Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / October 2007

Tip: Looking for answers? Try searching our database.

Dlookup

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Wavequation - 31 Oct 2007 00:33 GMT
can I use a SQL statement for the domain in dlookup?
Rick Brandt - 31 Oct 2007 01:42 GMT
> can I use a SQL statement for the domain in dlookup?

No. A custom replacement that did though should not be too difficult to create.

Signature

Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt   at   Hunter   dot   com

Wavequation - 31 Oct 2007 16:04 GMT
do you mean by opening a recordset using the sql, then performing the search?

> > can I use a SQL statement for the domain in dlookup?
>
> No. A custom replacement that did though should not be too difficult to create.
Ofer Cohen - 31 Oct 2007 16:57 GMT
Or, Openning the recordSet already filtered Instead of using FindFirst

Set MyRec = MyDB.OpenRecordSet("Select * From TableName Where FieldName = 2")
If Not MyRec.Eof Then

   .......
End If

Signature

Good Luck
BS"D

> do you mean by opening a recordset using the sql, then performing the search?
>
> > > can I use a SQL statement for the domain in dlookup?
> >
> > No. A custom replacement that did though should not be too difficult to create.
Wavequation - 31 Oct 2007 17:04 GMT
Is that code using a dao database object?

> Or, Openning the recordSet already filtered Instead of using FindFirst
>
[quoted text clipped - 9 lines]
> > >
> > > No. A custom replacement that did though should not be too difficult to create.
Ofer Cohen - 31 Oct 2007 17:18 GMT
Need to declare the database and recordset

' Declaration
Dim MyDb as Dao.DataBase, MyRec as Dao.RecordSet
' Set to the current db
Set MyDb=CurrentDb()
' Open record set
Set MyRec = MyDB.OpenRecordSet("Select * From TableName Where FieldName = 2")
' check if any records returned
If Not MyRec.Eof Then

Signature

Good Luck
BS"D

> Is that code using a dao database object?
>
[quoted text clipped - 11 lines]
> > > >
> > > > No. A custom replacement that did though should not be too difficult to create.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.