If statement

G

Guest

I am trying to create an "If" statement to run the "SendObject" function.
There are 4 fields on my form that need to be populated before the
"SendObject" function can run. How would I create an "If" statement to say
that when these 4 fields are populated then run the "SendObject" function?
Here's the catch...Not all 4 of these fields will be populated at the same
time. They may be done at different times but once they are all populted then
I want the "SendObject" function to fire.
 
G

Guest

In the forms afterupdate

If not isnull([field1]) and not isnull([field2]) and not isnull([field3])
and not isnull([field4]) then
Docmd.dendobject.......
end if

all 4 have to have and entry and will be checked every time the form is
changed.
 
G

Guest

Ok I will try that! Thank you!

schasteen said:
In the forms afterupdate

If not isnull([field1]) and not isnull([field2]) and not isnull([field3])
and not isnull([field4]) then
Docmd.dendobject.......
end if

all 4 have to have and entry and will be checked every time the form is
changed.



Secret Squirrel said:
I am trying to create an "If" statement to run the "SendObject" function.
There are 4 fields on my form that need to be populated before the
"SendObject" function can run. How would I create an "If" statement to say
that when these 4 fields are populated then run the "SendObject" function?
Here's the catch...Not all 4 of these fields will be populated at the same
time. They may be done at different times but once they are all populted then
I want the "SendObject" function to fire.
 
G

Guest

Back again...This code seems to work ok but if a user stays in a certain form
and makes changes to multiple records one after another, the "DoCmd" function
of this code will only run after the update has been made to the first
record. If the user goes to another record then it won't run it again. How
can I change this to make it work no matter how many records they update? I'm
using a form with a single record on it.

schasteen said:
In the forms afterupdate

If not isnull([field1]) and not isnull([field2]) and not isnull([field3])
and not isnull([field4]) then
Docmd.dendobject.......
end if

all 4 have to have and entry and will be checked every time the form is
changed.



Secret Squirrel said:
I am trying to create an "If" statement to run the "SendObject" function.
There are 4 fields on my form that need to be populated before the
"SendObject" function can run. How would I create an "If" statement to say
that when these 4 fields are populated then run the "SendObject" function?
Here's the catch...Not all 4 of these fields will be populated at the same
time. They may be done at different times but once they are all populted then
I want the "SendObject" function to fire.
 

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

Top