Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2015
    Posts
    23

    Cool Answered: Hyperlink works with number field but not with Text

    ="[EmployeeID]=" & Nz([EmployeeID],0)
    in Form1 I have heperlinks for Employees, it works with field [EmployeeID] but fails if I create a hyperlink for [EmployeeName]
    Please some one help me where should I place quotes or single quotes when I have text field rather than Integer or Number..

  2. Best Answer
    Posted by healdem

    "and what have you tried
    Hyperlink works with number field but not with Text
    is not an d never will be sufficient explanation of an error

    see http://www.dbforums.com/showthread.p...99#post6640199
    on how to delimit with pairs of ' or "

    numeric values as is
    text values delimited with pairs of ' or " but not mixed. bear in mind that you will have problem if the symbol you use to delimit can also be embedded int eh text. eg delimiting with ' will cause problems with a surname that is say O'Neill, likewise if you use imperial measurements and use ' for feet " for inches you will have problems IN text.
    date values should be delimited with # AND be in the format YYYY-MM-DD or MM-DD-YYYY"


  3. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    and what have you tried
    Hyperlink works with number field but not with Text
    is not an d never will be sufficient explanation of an error

    see http://www.dbforums.com/showthread.p...99#post6640199
    on how to delimit with pairs of ' or "

    numeric values as is
    text values delimited with pairs of ' or " but not mixed. bear in mind that you will have problem if the symbol you use to delimit can also be embedded int eh text. eg delimiting with ' will cause problems with a surname that is say O'Neill, likewise if you use imperial measurements and use ' for feet " for inches you will have problems IN text.
    date values should be delimited with # AND be in the format YYYY-MM-DD or MM-DD-YYYY
    I'd rather be riding on the Tiger 800 or the Norton

  4. #3
    Join Date
    Nov 2015
    Posts
    23
    I just added (') and (&) and now works perfect..!
    ="[EmployeeName]='" & Nz([EmployeeName],0) & "'"

  5. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    so what do you inted to happen with the NZ function
    what are you protecting against
    is there really a default employee whose name is 0?
    ..really surname of 0 zero

    ..does it matter if no name is retrieved if the employee name is null
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •