Kamis, 28 Juli 2016

Re: [MS_AccessPros] Replace field if another exists.

 

Art-

Sounds like you need an IIf function that tests the selection in the combo box and returns either the concatenated name or a DLookup to the other table.  Without more info, I can't give you specific code.

John Viescas, author
Effective SQL
SQL Queries for Mere Mortals
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Access Applications

On Jul 28, 2016, at 16:11, dbalorenzini@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

I have a query in which I need to display either the concatenated fullname or a name based on a ID in another table.


Select [FirstName] & " " & [LastName] as FullName, (or associated name from tblPerson if PersonID is selected, CitationID, Code, CitiationDate

FROM tblCitation


I would need to pull the [FirstName] & " " & [LastName] from tblPerson If the user selects a PersonID from the dropdown.


Clear as mud  know


Thank you,

Art Lorenzini

Sioux Falls, SD

__._,_.___

Posted by: John Viescas <johnv@msn.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

Save time and get your email on the go with the Yahoo Mail app
Get the beautifully designed, lighting fast, and easy-to-use Yahoo Mail today. Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Tidak ada komentar:

Posting Komentar