UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Conditional Formatting #type! Only In Some Boxes, Access 2013    
 
   
cjduncan
post Jul 24 2019, 02:27 PM
Post#1



Posts: 44
Joined: 30-April 19



Hello all!

I have applied conditional formatting to a control that will change it green when there is text in another control. This is on a continuous form. I get a #Type! in some of the boxes but not all, and when the color changes, some go to green and some just say #Type!. Also, sometimes they changes boxes. I'm lost, what is happening? Along with the screenshots, I've attached the DB in case anyone wants to take a look. TIA!
Attached File(s)
Attached File  cond_format.PNG ( 36.25K )Number of downloads: 1
Attached File  dlookup.PNG ( 26.57K )Number of downloads: 3
Attached File  type_screenshot.PNG ( 33.36K )Number of downloads: 3
Attached File  24JUL_soi_good.zip ( 210.9K )Number of downloads: 2
 
Go to the top of the page
 
theDBguy
post Jul 24 2019, 02:31 PM
Post#2


UA Moderator
Posts: 76,824
Joined: 19-June 07
From: SunnySandyEggo


Hi. Try wrapping your DLookup() expression within an Nz() function. For example:
CODE
=Nz(DLookup(...),0)
Hope it helps...

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
cjduncan
post Jul 24 2019, 02:52 PM
Post#3



Posts: 44
Joined: 30-April 19



Like this?

=Nz(DLookUp("SOIMIIDfk","SOIMI2OBJ","SOIMIIDfk=" & [SOIMIID] & " AND OBJIDfk = " & [refOBJID]),0)
Go to the top of the page
 
theDBguy
post Jul 24 2019, 02:53 PM
Post#4


UA Moderator
Posts: 76,824
Joined: 19-June 07
From: SunnySandyEggo


Sure. Give it a try and let us know how it goes. I didn't download your file, so I can't test it.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
cjduncan
post Jul 24 2019, 03:00 PM
Post#5



Posts: 44
Joined: 30-April 19



Got it! Thank you woohoo.gif
This post has been edited by cjduncan: Jul 24 2019, 03:05 PM
Go to the top of the page
 
June7
post Jul 24 2019, 03:04 PM
Post#6



Posts: 1,010
Joined: 25-January 16



DLookup expression is in textbox? Fix the expression in textbox.

And you edited your post so this is moot.
This post has been edited by June7: Jul 24 2019, 03:07 PM

--------------------
Attachments Manager is below the edit post window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
DEBUG! DEBUG! DEBUG! http://www.cpearson.com/Excel/DebuggingVBA.aspx
Go to the top of the page
 
theDBguy
post Jul 24 2019, 03:21 PM
Post#7


UA Moderator
Posts: 76,824
Joined: 19-June 07
From: SunnySandyEggo


Hi. Congratulations! Glad to hear you got it sorted out. Good luck with your project.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
cjduncan
post Jul 24 2019, 03:33 PM
Post#8



Posts: 44
Joined: 30-April 19



Dangit, I'm sorry, I spoke too soon. It's still doing it.
Go to the top of the page
 
cjduncan
post Jul 24 2019, 03:35 PM
Post#9



Posts: 44
Joined: 30-April 19



I don't get it, I closed the form and now the #Type! shows up in different boxes when I scroll through them
Go to the top of the page
 
theDBguy
post Jul 24 2019, 03:52 PM
Post#10


UA Moderator
Posts: 76,824
Joined: 19-June 07
From: SunnySandyEggo


Hi. I just downloaded your file. Which form are we supposed to look at?

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
cjduncan
post Jul 24 2019, 04:50 PM
Post#11



Posts: 44
Joined: 30-April 19



it will be 4_5_CTSMIs4SOI
Go to the top of the page
 
theDBguy
post Jul 24 2019, 04:57 PM
Post#12


UA Moderator
Posts: 76,824
Joined: 19-June 07
From: SunnySandyEggo


Hi. I'm not sure how you're using your forms but I tried the following steps.

1. I opened your database and closed the main form.
2. I opened the form 4_5_CTSMIs4SOI and saw the #Type! errors
3. I closed the form 4_5_CTSMIs4SOI
4. I opened the form 4_1_SOI
5. I opened the form 4_5_CTSMIs4SOI and the errors were gone

Do you get the same result?

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
cjduncan
post Jul 26 2019, 10:24 AM
Post#13



Posts: 44
Joined: 30-April 19



That's the way I would open my forms. But I'm still seeing the #Type! You didn't see any as you scroll up or down?
Go to the top of the page
 
theDBguy
post Jul 26 2019, 10:37 AM
Post#14


UA Moderator
Posts: 76,824
Joined: 19-June 07
From: SunnySandyEggo


Hi. The sample db you posted only had four records, so no, I scrolled through all four records and didn't see the #Type! error in any of them.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    9th December 2019 - 07:59 AM