Immediate validation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm a former VB programmer but have never coded anything for Access. I would like to perform a validation on a field as soon as it is entered. Specifically, I want to display a photo that corresponds to an item number as soon as it is entered. I have created code to display the photo when a record is displayed or when updated

Also, when I'm adding a new record, I see the last photo displayed until I store the new record

One more: What is Nz

Thanks anybody.
 
i can answer the last one: Nz() is a built-in function that basically says,
by
example:
Nz(x,y)
"if the value of x is Null, then use the value of y; otherwise, use the
value of x."

hth


Lon Weekly said:
I'm a former VB programmer but have never coded anything for Access. I
would like to perform a validation on a field as soon as it is entered.
Specifically, I want to display a photo that corresponds to an item number
as soon as it is entered. I have created code to display the photo when a
record is displayed or when updated.
 
Lon Weekly said:
I'm a former VB programmer but have never coded anything for Access.
I would like to perform a validation on a field as soon as it is
entered. Specifically, I want to display a photo that corresponds to
an item number as soon as it is entered. I have created code to
display the photo when a record is displayed or when updated.

Also, when I'm adding a new record, I see the last photo displayed
until I store the new record.

One more: What is Nz?

Thanks anybody.

Put code to display the image in the AfterUpdate event of the control
that is bound to the item number.

Nz is a VB function that checks to see if the fist argument is Null and,
if it is, substitutes the second argument for it. If it isn't Null, the
original first-argument value is returned. If no second argument is
specified, either 0 or a zero-length string is returned, except if this
happens in a query, where the default value is always a zero-length
string.

For example, in the Immediate Window

?nz(17, 0)
17
?nz(Null, 0)
0
?nz(Null)

?nz(Null, "Nothing Here")
Nothing Here
 
Back
Top