Re: Setting a Field to Empty
- From: "Alex Dybenko" <alexdyb@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 28 Oct 2005 13:55:18 +0400
To avoid confusin with Null you can use Nz function:
If nz(Me.Field1) <> "All Day" then
--
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com
"Jado" <ploxly@xxxxxxxxxxx> wrote in message
news:eQksFw52FHA.3732@xxxxxxxxxxxxxxxxxxxxxxx
> Hi
>
> i have a button on a form that checks the value/status of Field1
>
> if i create a new record and use the button which has the following code..
>
> Button1_OnClick()
> If Me.Field1 <> "All Day" then
> Me.Field2 = "Field1 is either AM or PM"
> End if
> End Sub
>
> then nothing happens, Great!
>
> Problem...
>
> if i enter a value i Field1, but then remove it using the following code..
>
> Button2_OnClick()
> Field1 = Null
> End Sub
>
> then if i use button 1, Field2 is udpated with the value "Field1 is either
> AM or PM".
>
> is it possible to set the field back to the same state it was in before
> any
> vale was entered?
>
> i always thought this state was Null, but obviously not!
>
> Thanks
>
> Jado
>
>
.
- References:
- Setting a Field to Empty
- From: Jado
- Setting a Field to Empty
- Prev by Date: Re: unzip files from VBA
- Next by Date: Re: Get Values SQL in table
- Previous by thread: Setting a Field to Empty
- Next by thread: Re: Getting the Hard Disk serial number
- Index(es):