Results 1 to 7 of 7
  1. #1
    IKZOUHETNIETWETEN is offline Novice
    Windows Vista Access 2007
    Join Date
    Oct 2015
    Posts
    6

    Hide error in textbox

    Guys


    Im Having an error code in my textbox of my form Unit2. Its supposed to be error cus when u dont fill in a projectnr, it obviously cant find it. (The Dlook works by the way if it can find it) I just want it to hide the error when there hasnt been filled in a projectnr YET. I tried this but to no avail. Its a text value that it needs to hide by the way.

    Code:
    =IIf(Nz(DLookUp("KH";"Project";"Projectnr=" & [Projectnr]);"");"")
    Or
    Code:
    =IIf(DLookUp("KH";"Project";"Projectnr=" & [Projectnr]);"");DLookUp("KH";"Project";"Projectnr=" & [Projectnr])
    Or
    Code:
    =IIf(DLookUp("KH";"Project";"Projectnr=" & [Projectnr])=[DbNullValue];"";DLookUp("KH";"Project";"Projectnr=" & [Projectnr]))

  2. #2
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,845

  3. #3
    IKZOUHETNIETWETEN is offline Novice
    Windows Vista Access 2007
    Join Date
    Oct 2015
    Posts
    6
    The more answers the better.

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2013
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    Lack of respect for the people willing to help you = fewer answers

    Good luck with your project.
    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
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    Quote Originally Posted by IKZOUHETNIETWETEN View Post
    The more answers the better.
    This summarizes a lot of people's issue with cross posting:

    http://www.excelguru.ca/content.php?184
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2013
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    Quote Originally Posted by pbaldy View Post
    This summarizes a lot of people's issue with cross posting:

    http://www.excelguru.ca/content.php?184
    I believe the OP has already been offered that link in the cross-post. Just highlights one the problems with cross-posting really (trying to follow more than thread on the same subject)
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    Quote Originally Posted by Bob Fitz View Post
    I believe the OP has already been offered that link in the cross-post. Just highlights one the problems with cross-posting really (trying to follow more than thread on the same subject)
    Hadn't looked, but you are correct. Like many, I've spent significant time answering a question only to find it already resolved elsewhere. It's very frustrating to have wasted your time. As you suggest in post 4, I note the people who do it, and won't bother with their questions unless it's a very brief answer.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 1
    Last Post: 10-12-2015, 01:46 AM
  2. Replies: 3
    Last Post: 01-14-2014, 04:17 PM
  3. Replies: 5
    Last Post: 05-22-2012, 08:06 AM
  4. Hide Report on Textbox Value
    By alyon in forum Access
    Replies: 4
    Last Post: 07-29-2011, 11:19 AM
  5. Replies: 3
    Last Post: 08-13-2010, 11:23 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