Results 1 to 7 of 7
  1. #1
    mpaulbattle is offline Advanced Beginner
    Windows 7 32bit Access 2010 64bit
    Join Date
    Aug 2013
    Location
    Houston
    Posts
    50

    Needing help with Expression to return Text value instead of ID

    Trying to write an expression that will give me the text value instead of the ID field on my form in a text box.
    The form Record Source is based on a query of two tables: tblPractices and tblTechnical. what I am trying to get from the expression is the following

    =IIf([Jobserver]<>"", "\" & [Jobserver] & "\d$\eClinical\t8" & [Mnemonic] & "\webapps\mobiled\jsp\catalog\lbs", "No Server")

    \\ Jobserver1\d$\eClinical\t8\ABCD\webapps\mobiled\js p\catalog\lbs...but this is not working and it puts in the box #type

    However, if i use the id field it places the ID in there.



    =IIf([JobserverID_FK]<>"", "\" & [JobserverID_FK] & "\d$\eClinical\t8" & [Mnemonic] & "\webapps\mobiled\jsp\catalog\lbs", "No Server")

    \\1\d$\eClinical\t8\ABCD\webapps\mobiled\jsp\catal og\lbs...but this is not working.

    This will be a hyperlink to open the folder.

    Is it something I am missing?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Is JobserverID_FK a number type field? If so, testing for empty string is meaningless.

    Why is form bound to query of two tables?

    Which table has Jobserver and JobserverID_FK fields?

    If you want to provide db for analysis, follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2016
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    It would be helpful if you could
    -show readers the table designs (field names and datatypes),
    -provide plain English description and sample of what you want to achieve.

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  5. #5
    mpaulbattle is offline Advanced Beginner
    Windows 7 32bit Access 2010 64bit
    Join Date
    Aug 2013
    Location
    Houston
    Posts
    50
    Quote Originally Posted by June7 View Post
    Is JobserverID_FK a number type field? If so, testing for empty string is meaningless.

    Why is form bound to query of two tables?

    Which table has Jobserver and JobserverID_FK fields?

    If you want to provide db for analysis, follow instructions at bottom of my post.
    The form is bound by a query of two tables because I need [Mnemonic] from tblPractices and the [Jobserver] from tblHSJobServer

    Breakdown of the tables: (I threw in a third table because that is where the JobServer is located.) I did add the 3rd table to my query before posting this reply but still the same message.
    tblPractices | tblHostingServices | tblHSJobserver
    PracticeID HostingServiceID JobServerID
    Mnemonic PracticeID_FK JobServer
    JobServerID_FK

    I will try to provide a db but can't from my work computer. Won't allow me to.

  6. #6
    mpaulbattle is offline Advanced Beginner
    Windows 7 32bit Access 2010 64bit
    Join Date
    Aug 2013
    Location
    Houston
    Posts
    50
    Quote Originally Posted by Bob Fitz View Post
    thanks for the reminder.

  7. #7
    mpaulbattle is offline Advanced Beginner
    Windows 7 32bit Access 2010 64bit
    Join Date
    Aug 2013
    Location
    Houston
    Posts
    50
    Ok, so somehow the change i made took place after logging out and back in
    It seems to be working.
    Took the que from which table is JobServer listed under

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 03-16-2020, 06:53 AM
  2. Expression to return MAX VALUES
    By knpaddac in forum Access
    Replies: 4
    Last Post: 07-28-2017, 03:43 PM
  3. Replies: 4
    Last Post: 06-26-2017, 12:19 PM
  4. Replies: 3
    Last Post: 03-27-2014, 08:11 AM
  5. Query Expression to return only the latest data
    By Brinleigh217 in forum Queries
    Replies: 6
    Last Post: 03-23-2012, 02:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums