a bit of help (1 Viewer)

wiredgecko

New member
Local time
Yesterday, 19:56
Joined
May 17, 2015
Messages
2
hello everyone. this will be my first post.

i have date field 1 and date field 2 along with a field title "status".
what i am trying to accomplish is the following:

if date field 1 and date field 2 are blank then the status field should remain blank

if date field 1 is not blank and date field 2 is blank the the status field should read "waiting"

if both date fields are not blank then the status field should read "received"

Thxs
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 00:56
Joined
Jul 9, 2003
Messages
16,290
Where are these fields? Are they in a table or are they on a form?
 

wiredgecko

New member
Local time
Yesterday, 19:56
Joined
May 17, 2015
Messages
2
they are in a form
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 00:56
Joined
Sep 12, 2006
Messages
15,663
Code:
 if nz(df1,0)=0 and nz(df2,0)=0 then
      "blank"
 else
      if nz(df1,0)>0 and nz(df2,0)>0 then
           "received"
      else
            "waiting"
      end if
 end if
note that there is an error condition of df1 being blank amd df2 being not blank
 

Users who are viewing this thread

Top Bottom