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 / General 2 / March 2007

Tip: Looking for answers? Try searching our database.

Need value to show from a different table...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kelvin Beaton - 23 Mar 2007 20:42 GMT
I have a form that has a data source of qry_login.

I want to display a value from a table qry_SQLConnect called "SQLServerDB"

I used the expression builder and came up with this,
=qry_SQLConnect.SQLServerDB, but when I view the form I just get #Name?

Can I have the form based on one source and a test box display a value from
a different source?

Any help would be appreciated!!!

Kelvin
Douglas J. Steele - 23 Mar 2007 22:43 GMT
Use the DLookup function:

=DLookup("SQLServerDB", "qry_SQLConnect")

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)

>I have a form that has a data source of qry_login.
>
[quoted text clipped - 9 lines]
>
> Kelvin
Kelvin Beaton - 26 Mar 2007 16:28 GMT
Thanks that works great!

Now I'd like to make the displaying of this information conditional.
Neither of these work:
=iif(Right("SQLServerDB","qry_SQLConnect", 4)="test",
DLookUp("SQLServerDB","qry_SQLConnect"), "")
=iif(Right([SQLServerDB].[qry_SQLConnect], 4)="test",
(DLookUp("SQLServerDB","qry_SQLConnect")), "")

Where am I going wrong with this?

Thanks

Kelvin

> Use the DLookup function:
>
[quoted text clipped - 14 lines]
>>
>> Kelvin
Douglas J. Steele - 26 Mar 2007 17:06 GMT
=IIf(Right(DLookUp("SQLServerDB","qry_SQLConnect"), 4) = "test",
DLookUp("SQLServerDB","qry_SQLConnect"), "")

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> Thanks that works great!
>
[quoted text clipped - 29 lines]
>>>
>>> Kelvin
 
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.