I am beginning to get frustrated :( 
Author Message
 I am beginning to get frustrated :(

This HAS to be something simple but it doesn't work.

Dim mydb As Database, rs As Recordset, booSend As Boolean

booSend = True

Set mydb = CurrentDb
Set rs = mydb.OpenRecordset("Production Main", dbOpenDynaset)

If Me![cbCust] = Null Then
booSend = False
End If

If booSend = True Then
Call VQty(Me!tbESD, Me!tbQty, booSend)
End If

The record is BLANK and when I use the debug record the cbcust field.value =
Null.  Yet this still calls the function.  What is wrong with my picture?

Thanks

Jerry



Tue, 11 Feb 2003 03:00:00 GMT  
 I am beginning to get frustrated :(
The correct way to test for Null is with the IsNull function.

Try:

If IsNull(Me![cbCust]) Then

BTW, where did you come up with boo as a tag for a Boolean?  I've seen f (for flag), bol, bool, and bln, but never boo.  Sounds like
a Halloween tag!  ;-)

--

Sco

M.L. "Sco" Scofield, MCT, MCP, MSS
Useful Metric Conversion #8 of 19: 453.6 graham crackers = 1 pound cake

Quote:

> This HAS to be something simple but it doesn't work.

> Dim mydb As Database, rs As Recordset, booSend As Boolean

> booSend = True

> Set mydb = CurrentDb
> Set rs = mydb.OpenRecordset("Production Main", dbOpenDynaset)

> If Me![cbCust] = Null Then
> booSend = False
> End If

> If booSend = True Then
> Call VQty(Me!tbESD, Me!tbQty, booSend)
> End If

> The record is BLANK and when I use the debug record the cbcust field.value =
> Null.  Yet this still calls the function.  What is wrong with my picture?

> Thanks

> Jerry



Tue, 11 Feb 2003 03:00:00 GMT  
 I am beginning to get frustrated :(
If you want to test for Null and Blanks at the same time, try this :

    if Nz(Me![cbCust],"") = "" then

Ecto2000



Quote:
> The correct way to test for Null is with the IsNull function.

> Try:

> If IsNull(Me![cbCust]) Then

> BTW, where did you come up with boo as a tag for a Boolean?  I've seen f

(for flag), bol, bool, and bln, but never boo.  Sounds like
Quote:
> a Halloween tag!  ;-)

> --

> Sco

> M.L. "Sco" Scofield, MCT, MCP, MSS
> Useful Metric Conversion #8 of 19: 453.6 graham crackers = 1 pound cake




Quote:
> > This HAS to be something simple but it doesn't work.

> > Dim mydb As Database, rs As Recordset, booSend As Boolean

> > booSend = True

> > Set mydb = CurrentDb
> > Set rs = mydb.OpenRecordset("Production Main", dbOpenDynaset)

> > If Me![cbCust] = Null Then
> > booSend = False
> > End If

> > If booSend = True Then
> > Call VQty(Me!tbESD, Me!tbQty, booSend)
> > End If

> > The record is BLANK and when I use the debug record the cbcust
field.value =
> > Null.  Yet this still calls the function.  What is wrong with my
picture?

> > Thanks

> > Jerry



Sun, 16 Feb 2003 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Am beginning, can someone help me start, PLEASE!

2. Getting frustrated VBGetPixEx causes GPF

3. why am I getting this error??

4. Why am I getting this message?

5. HELP!!! Cmd.CreateParameter I am getting crazy

6. Null Values - WHY am I getting this error?

7. Getting IP Address on machine I am using

8. I AM GETTING MAD AT THIS

9. VB4 16-bits: I am getting an error message when compiling

10. Sheridan SSTAB - Interesting problem that I am getting

11. I am getting errors I can't pin down

12. Please Help: Why am I now getting this error

 

 
Powered by phpBB® Forum Software