DB crash when using this conditional format (1 Viewer)

mikematthys

New member
Local time
Today, 12:05
Joined
Jan 24, 2019
Messages
7
I have a subform (continious form) with 7 fields that have 2 conditional formats, when i enter these formats the db start randomly crashing, like 3 times it open well 4 the time it crashes etc .. it once crashed that hard that all my files in the db got deleted. what am i doing wrong ?

conditions below,

datumv looks as follow : 08:15 - 15:30 (start and endtime)
condition 1
(TimeValue(Left([datumv];5))>#15:15:00# And [datumv] Is Not Null And TimeValue(Left([datumv];5))<#17:15:00#) Or (TimeValue(Mid([datumv];9;5))>#15:15:00# And [datumv] Is Not Null And TimeValue(Mid([datumv];9;5))<#16:59:00#)

condition 2
(TimeValue(Left([datumv];5))<#17:15:00# And [datumv] Is Not Null And [datumv] Not In ('.';' - ') And TimeValue(Left([datumv];5))>=#15:15:00#) Or (TimeValue(Left([datumv];5))<#17:15:00# And [datumv] Is Not Null And [datumv] Not In ('.';' - ') And TimeValue(Left([datumv];5))>=#07:00:00# And TimeValue(Mid([datumv];9;5))>#15:15:00#)


is it going out of the limits of what you can do with conditional formatting or is there an error in it that i overlooked

Anyone who can gimme a hand with this ?

Mike
 

theDBguy

I’m here to help
Staff member
Local time
Today, 12:05
Joined
Oct 29, 2018
Messages
21,454
Hi Mike. Welcome to the forum. Can you please check if your table has any null values in any of the fields you're referring to in your Conditional Formatting expression? Just curious...
 

mikematthys

New member
Local time
Today, 12:05
Joined
Jan 24, 2019
Messages
7
Hey,

they actually do have emty fields

they can be ".", " - ", "08:15 - 17:15" (example time), or empty

its a plansystem with daypartblocks like for example
08:15 - 10:00 , 10:15 - 12:30 where each block got his backgroundcolor light up when he is within his working hours

i am allready using this conditional system on other fields but there i use Left([datumv];2) In ('08';'07';'09') for example, because i dont need to know the minutes in these cases, maybe its the formatting to timevalue that access aint to happy about.

its a struggle :)

for your idea this is how it looks
(i67.tinypic.com/ru5hkz.jpg)

Mike
 

theDBguy

I’m here to help
Staff member
Local time
Today, 12:05
Joined
Oct 29, 2018
Messages
21,454
Hi Mike. Okay, I was thinking if you have empty (null) fields, then maybe the expressions is choking up when trying to evaluate those. If so, you might try modifying them to include the Nz() function to make sure the expression can evaluate null fields too. Just a thought...
 

mikematthys

New member
Local time
Today, 12:05
Joined
Jan 24, 2019
Messages
7
the moment you said null fields in your previous post i was thinking NZ() hummm so yeah wurth a try, ill implement it tomorrow and let you know

thank you for thinking with me so far :)
 

theDBguy

I’m here to help
Staff member
Local time
Today, 12:05
Joined
Oct 29, 2018
Messages
21,454
No worries. Good luck and let us know how it goes.
 

Users who are viewing this thread

Top Bottom