Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 278
  • Last Modified:

easy one (I hope): detecting null date value in combo box

Dear experts:
I have a combo box in a continuous form; one of its columns (index=7) contains an approval date, which may either be populated or null.
I am using conditional formatting on another field in the same record.
It is choking on the expression I am using to detect if that date is there or not.
I am using this:
 Nz([Form]![cbopart_id].[column](7),0)<>0
Any ideas?
Thanks!
0
terpsichore
Asked:
terpsichore
1 Solution
 
Jeffrey CoachmanCommented:
Try this:

Expression Is:  [cbopart_id].column(7)=""
0
 
Jeffrey CoachmanCommented:
works fine for me here...

I am sure you can modify this to work in your db...
Database59.mdb
0
 
IrogSintaCommented:
Hmmm, I'm not sure why that wouldn't work for you.  Unless you're really referring to column 6 since the first column starts at 0.
0
 
Gustav BrockCIOCommented:
Nz([Form]![cbopart_id].[column](7),0)<>0

does not work because values from comboboxes always are strings. Thus, Nz makes no sense here, and also the value would never be 0 but "0".

Jeffrey provided the solution. Alternatively, if you like:

Len([Form]![cbopart_id].[column](7))=0

/gustav
0
 
terpsichoreAuthor Commented:
thanks - you guys/gals were extremely helpful.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now