Coding - Form Status

A

Al

Hi - Another query...!,

I've got a status field on my main form frmContracts. I've currently got
some code that after update of the field if the status = closed it will set
the DateClosed field to =Now().

What I need to do instead is to lookup whether or not the status is actually
classed as a closed status instead.

My status table is like:
UniqueID
Status
StatusOpen

Therefore is it possible to do the following:
After Status_update
If StatusOpen attribute of the Status chosen is False
Set DateClosed = Now()
Else Nothing (no action required).

I'm guessing this is some kind of SQL look-up that's required based on
chosen option but have no idea how to do this?

Thanks, Al.
 
M

Mike Painter

Al said:
Hi - Another query...!,

I've got a status field on my main form frmContracts. I've currently
got some code that after update of the field if the status = closed
it will set the DateClosed field to =Now().

What I need to do instead is to lookup whether or not the status is
actually classed as a closed status instead.

My status table is like:
UniqueID
Status
StatusOpen

Therefore is it possible to do the following:
After Status_update
If StatusOpen attribute of the Status chosen is False
Set DateClosed = Now()
Else Nothing (no action required).

I'm guessing this is some kind of SQL look-up that's required based on
chosen option but have no idea how to do this?

Thanks, Al.

If StatusOpen = False Then
Me!Set DateClosed = Now()
End If

Note that Now() stores the date and time making some reports a problem,
especially if between is used.
Date() is usually a better choice.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top