null experssion

  • Thread starter Thread starter MartinR
  • Start date Start date
M

MartinR

Hi.
I would like to known the code that is the opposite to "is null".

what i am trying to do is to open a form that will only display the
records that have no value in the "date in" field and that have a value
in the "works no" field.

The code i have at the moment is:

Dim stDocName As String
Dim stLinkCriteria As String
stLinkCriteria = "[Date In] Is Null" & "[Works no] Is Not Null"
stDocName = "historyrepair"
DoCmd.OpenForm stDocName, acFormDS, , stLinkCriteria

Can someone please help?
Regards
Martin
 
MartinR said:
Hi.
I would like to known the code that is the opposite to "is null".

what i am trying to do is to open a form that will only display the
records that have no value in the "date in" field and that have a
value in the "works no" field.

The code i have at the moment is:

Dim stDocName As String
Dim stLinkCriteria As String
stLinkCriteria = "[Date In] Is Null" & "[Works no] Is Not Null"
stDocName = "historyrepair"
DoCmd.OpenForm stDocName, acFormDS, , stLinkCriteria

Can someone please help?
Regards
Martin

It looks like it is almost there

stLinkCriteria = "[Date In] Is Null AND [Works no] Is Not Null"
 
Cheers,

That worked perfect.
If only all of lifes problems could be solved as easily as that.

regards
Martin
 

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

Back
Top