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 / Forms / May 2007

Tip: Looking for answers? Try searching our database.

DLookup problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tony Williams - 23 May 2007 12:11 GMT
I have a control on a form that has as its record source the following
DLookup
=DLookUp("[txtfirstname]","[tblindividual]","[txtmemnumber]=Forms![frmcomplaint].[txtmemnbr]")

Although this seems to work when I look at the form in design mode there is
an asterix against the control and the message is Invalid Control
Property:Control Source and it also says Circular reference. Anyone tell me
what might be wrong?
Thanks
Tony
Klatuu - 23 May 2007 14:05 GMT
The reference to the form control has to be outside the quotes.
=DLookUp("[txtfirstname]","[tblindividual]","[txtmemnumber]= '" &
Forms![frmcomplaint].[txtmemnbr] & "'")

The syntax above assumes [txtfirstname] is a text field.

Signature

Dave Hargis, Microsoft Access MVP

> I have a control on a form that has as its record source the following
> DLookup
[quoted text clipped - 6 lines]
> Thanks
> Tony
Tony Williams - 23 May 2007 15:01 GMT
Thanks but got #Error with that ?
Tony

> The reference to the form control has to be outside the quotes.
> =DLookUp("[txtfirstname]","[tblindividual]","[txtmemnumber]= '" &
[quoted text clipped - 12 lines]
> > Thanks
> > Tony
Klatuu - 23 May 2007 16:08 GMT
That is an unusual record source for a form.  It will return only one field
of one record.  Is it that what you really mean is a control source for a
control? If so, I have found that it works better like this:

=DLookUp("[txtfirstname]","[tblindividual]","[txtmemnumber]= '" &
[txtmemnbr] & "'")

Signature

Dave Hargis, Microsoft Access MVP

> Thanks but got #Error with that ?
> Tony
[quoted text clipped - 15 lines]
> > > Thanks
> > > Tony
 
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.