If null then enter a value


F

fishqqq

I have a macro that opens a form and I would like one of the fields to
be updated if it is null once the form opens,

I"m not sure what steps to take in the macro to perform this.

the form name is [AWB Main Info]
the field I want to update is [Origin City Code]
and if this field is null then I want to set it's value to "YYZ"

step one
Open form [AWB Main Info]

step two
Go To Control {Origin City Code]

at this point i don't know what to do

Can someone please shed some light on this for me?

Thank you
Steve
 
Ad

Advertisements

Ad

Advertisements

F

fishqqq

SetValue
    [Origin City Code]
    Nz([Origin City Code], "YYZ")

--

        Ken Snellhttp://www.accessmvp.com/KDSnell/


I have a macro that opens a form and I would like one of the fields to
be updated if it is null once the form opens,
I"m not sure what steps to take in the macro to perform this.
the form name is [AWB Main Info]
the field I want to update is [Origin City Code]
and if this field is null then I want to set it's value to "YYZ"
step one
Open form [AWB Main Info]
step two
Go To Control {Origin City Code]
at this point i don't know what to do
Can someone please shed some light on this for me?
Thank you
Steve
thanks this works perfectly
 

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

Similar Threads

Null values 3
updating value to null 3
Null values in tables and VBA 2
function that would lookup for null value 2
Conditional (Null Value) Macro won't run 2
Null in conditions 1
No null fields 2
Find Null 1

Top