Yes/No as Criteria

G

Guest

I don't know if this is possible but here it goes...

I have a form based on a table that contains yes/no fields labeled "Y",
"N/I" and "N". A comment is required when the supervisor selects that the
employee needs improvement (N/I) or is not doing something correctly (N).
The supervisors know this but I would like to build it into the form if
possible.

I would like to set the form up so that if the user checks the "N/I" or "N"
boxes the focus moves to the Comments field and stays there until they enter
a comment about what the employee needs to improve.

Is this possible? Thank you in advance.
 
G

Guest

I have never used an option group before and that works great. Thank you for
that!

Can you tell me how I would make it a requirement to enter a comment if N/I
or N is choosen from the option group?
 
G

Guest

I like to use macros rather than code.
Open the form in design view and click on the option group frame. Right
click and select properties. Scroll down to On Update. Type in the name of
the macro you will use.
Create the macro using condition to see if the option group (
[Forms]![YourFormName]![Frame1] ) > 0
Have action GotoControl -- your comment field.

In the comment field property On Lost Focus call macro.
Create the macro using condition to see if the comments are null (
[Forms]![YourFormName]![YourTextBox] ) Is Null
Have action MsgBox -- say need comments in the field.
Have action GotoControl -- your comment field.
 
B

BruceM

"I like to use macros rather than code."

Why is that?


KARL DEWEY said:
I like to use macros rather than code.
Open the form in design view and click on the option group frame. Right
click and select properties. Scroll down to On Update. Type in the name
of
the macro you will use.
Create the macro using condition to see if the option group (
[Forms]![YourFormName]![Frame1] ) > 0
Have action GotoControl -- your comment field.

In the comment field property On Lost Focus call macro.
Create the macro using condition to see if the comments are null (
[Forms]![YourFormName]![YourTextBox] ) Is Null
Have action MsgBox -- say need comments in the field.
Have action GotoControl -- your comment field.
--
KARL DEWEY
Build a little - Test a little


AccessIM said:
I have never used an option group before and that works great. Thank you
for
that!

Can you tell me how I would make it a requirement to enter a comment if
N/I
or N is choosen from the option group?
 
G

Guest

Cause I have not learned the basic. I have to reverse engineering code and
edit each time.
--
KARL DEWEY
Build a little - Test a little


BruceM said:
"I like to use macros rather than code."

Why is that?


KARL DEWEY said:
I like to use macros rather than code.
Open the form in design view and click on the option group frame. Right
click and select properties. Scroll down to On Update. Type in the name
of
the macro you will use.
Create the macro using condition to see if the option group (
[Forms]![YourFormName]![Frame1] ) > 0
Have action GotoControl -- your comment field.

In the comment field property On Lost Focus call macro.
Create the macro using condition to see if the comments are null (
[Forms]![YourFormName]![YourTextBox] ) Is Null
Have action MsgBox -- say need comments in the field.
Have action GotoControl -- your comment field.
--
KARL DEWEY
Build a little - Test a little


AccessIM said:
I have never used an option group before and that works great. Thank you
for
that!

Can you tell me how I would make it a requirement to enter a comment if
N/I
or N is choosen from the option group?

:

You should not be using three fields but an Option Group that uses one
field.

--
KARL DEWEY
Build a little - Test a little


:

I don't know if this is possible but here it goes...

I have a form based on a table that contains yes/no fields labeled
"Y",
"N/I" and "N". A comment is required when the supervisor selects
that the
employee needs improvement (N/I) or is not doing something correctly
(N).
The supervisors know this but I would like to build it into the form
if
possible.

I would like to set the form up so that if the user checks the "N/I"
or "N"
boxes the focus moves to the Comments field and stays there until
they enter
a comment about what the employee needs to improve.

Is this possible? Thank you in advance.
 
G

Guest

That is wonderful!!! Thank you so much for the suggestion. It works so much
better and is more efficient than the way I was doing it!

KARL DEWEY said:
I like to use macros rather than code.
Open the form in design view and click on the option group frame. Right
click and select properties. Scroll down to On Update. Type in the name of
the macro you will use.
Create the macro using condition to see if the option group (
[Forms]![YourFormName]![Frame1] ) > 0
Have action GotoControl -- your comment field.

In the comment field property On Lost Focus call macro.
Create the macro using condition to see if the comments are null (
[Forms]![YourFormName]![YourTextBox] ) Is Null
Have action MsgBox -- say need comments in the field.
Have action GotoControl -- your comment field.
--
KARL DEWEY
Build a little - Test a little


AccessIM said:
I have never used an option group before and that works great. Thank you for
that!

Can you tell me how I would make it a requirement to enter a comment if N/I
or N is choosen from the option group?
 
B

BruceM

OK. I just wondered if there was a technical reason having to do with
option groups, or something like that.

KARL DEWEY said:
Cause I have not learned the basic. I have to reverse engineering code
and
edit each time.
--
KARL DEWEY
Build a little - Test a little


BruceM said:
"I like to use macros rather than code."

Why is that?


KARL DEWEY said:
I like to use macros rather than code.
Open the form in design view and click on the option group frame. Right
click and select properties. Scroll down to On Update. Type in the
name
of
the macro you will use.
Create the macro using condition to see if the option group (
[Forms]![YourFormName]![Frame1] ) > 0
Have action GotoControl -- your comment field.

In the comment field property On Lost Focus call macro.
Create the macro using condition to see if the comments are null (
[Forms]![YourFormName]![YourTextBox] ) Is Null
Have action MsgBox -- say need comments in the field.
Have action GotoControl -- your comment field.
--
KARL DEWEY
Build a little - Test a little


:

I have never used an option group before and that works great. Thank
you
for
that!

Can you tell me how I would make it a requirement to enter a comment
if
N/I
or N is choosen from the option group?

:

You should not be using three fields but an Option Group that uses
one
field.

--
KARL DEWEY
Build a little - Test a little


:

I don't know if this is possible but here it goes...

I have a form based on a table that contains yes/no fields labeled
"Y",
"N/I" and "N". A comment is required when the supervisor selects
that the
employee needs improvement (N/I) or is not doing something
correctly
(N).
The supervisors know this but I would like to build it into the
form
if
possible.

I would like to set the form up so that if the user checks the
"N/I"
or "N"
boxes the focus moves to the Comments field and stays there until
they enter
a comment about what the employee needs to improve.

Is this possible? Thank you in advance.
 
G

Guest

Ok, another question for you.

I now have all the tables set up with fields for Question1, Question2, etc.
and am using the option group for the users to answer the question with a Y,
N/I, N or N/A.

The answers are assigned values as follows:
Y=1, N/I=2, N=3 and N/A=4

I would like to know the number of times N/I or N is chosen as an anwer for
every question in the table. I have found a way to do this through a query
but it is very lengthy (see a partial example below - some of the tables have
23 questions).

SELECT Count(qryForkliftLetdownPM.Question1) AS CountOfQuestion1,
Count(qryForkliftLetdownPM.Question2) AS CountOfQuestion2,
Count(qryForkliftLetdownPM.Question3) AS CountOfQuestion3,
Count(qryForkliftLetdownPM.Question4) AS CountOfQuestion4
FROM qryForkliftLetdownPM
WHERE (((qryForkliftLetdownPM.Question1)="2")) OR
(((qryForkliftLetdownPM.Question2)="2")) OR
(((qryForkliftLetdownPM.Question3)="2")) OR
(((qryForkliftLetdownPM.Question4)="2"))

I am doing these queries for "2" (N/I) and "3" (N) separately. Is there an
easier way?

AccessIM said:
That is wonderful!!! Thank you so much for the suggestion. It works so much
better and is more efficient than the way I was doing it!

KARL DEWEY said:
I like to use macros rather than code.
Open the form in design view and click on the option group frame. Right
click and select properties. Scroll down to On Update. Type in the name of
the macro you will use.
Create the macro using condition to see if the option group (
[Forms]![YourFormName]![Frame1] ) > 0
Have action GotoControl -- your comment field.

In the comment field property On Lost Focus call macro.
Create the macro using condition to see if the comments are null (
[Forms]![YourFormName]![YourTextBox] ) Is Null
Have action MsgBox -- say need comments in the field.
Have action GotoControl -- your comment field.
--
KARL DEWEY
Build a little - Test a little


AccessIM said:
I have never used an option group before and that works great. Thank you for
that!

Can you tell me how I would make it a requirement to enter a comment if N/I
or N is choosen from the option group?

:

You should not be using three fields but an Option Group that uses one field.

--
KARL DEWEY
Build a little - Test a little


:

I don't know if this is possible but here it goes...

I have a form based on a table that contains yes/no fields labeled "Y",
"N/I" and "N". A comment is required when the supervisor selects that the
employee needs improvement (N/I) or is not doing something correctly (N).
The supervisors know this but I would like to build it into the form if
possible.

I would like to set the form up so that if the user checks the "N/I" or "N"
boxes the focus moves to the Comments field and stays there until they enter
a comment about what the employee needs to improve.

Is this possible? Thank you in advance.
 
G

Guest

You are using spreadsheet methodology instead of database.
Here is what the table structure should be to store the answers.
Answers --
PeopleID - foreign key
Quest - number - long integer
Answer - number - long integer

This makes it simpler to count answers to each question or count all N/A's
or whatever.
--
KARL DEWEY
Build a little - Test a little


AccessIM said:
Ok, another question for you.

I now have all the tables set up with fields for Question1, Question2, etc.
and am using the option group for the users to answer the question with a Y,
N/I, N or N/A.

The answers are assigned values as follows:
Y=1, N/I=2, N=3 and N/A=4

I would like to know the number of times N/I or N is chosen as an anwer for
every question in the table. I have found a way to do this through a query
but it is very lengthy (see a partial example below - some of the tables have
23 questions).

SELECT Count(qryForkliftLetdownPM.Question1) AS CountOfQuestion1,
Count(qryForkliftLetdownPM.Question2) AS CountOfQuestion2,
Count(qryForkliftLetdownPM.Question3) AS CountOfQuestion3,
Count(qryForkliftLetdownPM.Question4) AS CountOfQuestion4
FROM qryForkliftLetdownPM
WHERE (((qryForkliftLetdownPM.Question1)="2")) OR
(((qryForkliftLetdownPM.Question2)="2")) OR
(((qryForkliftLetdownPM.Question3)="2")) OR
(((qryForkliftLetdownPM.Question4)="2"))

I am doing these queries for "2" (N/I) and "3" (N) separately. Is there an
easier way?

AccessIM said:
That is wonderful!!! Thank you so much for the suggestion. It works so much
better and is more efficient than the way I was doing it!

KARL DEWEY said:
I like to use macros rather than code.
Open the form in design view and click on the option group frame. Right
click and select properties. Scroll down to On Update. Type in the name of
the macro you will use.
Create the macro using condition to see if the option group (
[Forms]![YourFormName]![Frame1] ) > 0
Have action GotoControl -- your comment field.

In the comment field property On Lost Focus call macro.
Create the macro using condition to see if the comments are null (
[Forms]![YourFormName]![YourTextBox] ) Is Null
Have action MsgBox -- say need comments in the field.
Have action GotoControl -- your comment field.
--
KARL DEWEY
Build a little - Test a little


:

I have never used an option group before and that works great. Thank you for
that!

Can you tell me how I would make it a requirement to enter a comment if N/I
or N is choosen from the option group?

:

You should not be using three fields but an Option Group that uses one field.

--
KARL DEWEY
Build a little - Test a little


:

I don't know if this is possible but here it goes...

I have a form based on a table that contains yes/no fields labeled "Y",
"N/I" and "N". A comment is required when the supervisor selects that the
employee needs improvement (N/I) or is not doing something correctly (N).
The supervisors know this but I would like to build it into the form if
possible.

I would like to set the form up so that if the user checks the "N/I" or "N"
boxes the focus moves to the Comments field and stays there until they enter
a comment about what the employee needs to improve.

Is this possible? Thank you in advance.
 

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