Hi Eric,
Comments In-Line:
--
Cheryl Fischer
Law/Sys Associates
Houston, TX
Eric G said:
Hi Cheryl,
Thanks for your help!
I like your idea very much and have started the design of the new
form.
I have a few questions.
When setting up with the wizard I chose 'save the values for later
use', rather than 'store the values in a field'. Was this the right
choice?
It depends. See my response to your question: "As I now enter values onto
this new form, (continuous forms view) > with several records being viewed,
the same value is being copied into > each record, (they aren't independent
right now)."
Do I create this as a text control box?
Yes, This is a normal text box, bound to your Days field. The only
departure from normal is that the Locked property is set to true. As you
indicated in your earlier post, there seems to be a problem with Days being
applied when Suspended is not checked, so you can use code to allow Days to
be applied/assessed ONLY when Suspended is checked.
Will this value be transferred to the text control box?
Yes. In the code below
As I now enter values onto this new form, (continuous forms view)
with several records being viewed, the same value is being copied into
each record, (they aren't independent right now).
Will this change?
I must have overlooked mention of your using a continuous form in your
earlier post. For a continuous form, this is normal behavior. To have each
control in a column display values independent of each other, the control
must be bound to a field in the underlying table or query. So, Days should
be a field in your table. And, if you want the Option Group values to be
independent of each other, you may need to have a field in your table named,
say, DiscipAction, which will store the value selected from the Option
Group.
My current AttendSus table mirrors my AttendSus form. Values that are
input into the form are being entered into the table. It is from this
table that my various queries work with.
Will I be able to operate the same way with the new form?
Your earlier post indicated a desire for better control/accuracy of data
entered. In order to get this, you may need to make some changes in how the
data is entered. That is what the Option Group (allowing only one choice)
and InputBox (which allows Suspension Days to be entered only when the
Suspended option is selected) will do for you.
It seems there is a fundamental difference; with the option box having
an event attached to it. (afterupdate event)
The AfterUpdate is just a means of letting Access know that you want it to
do something when the user updates a control on a form. If you do not want
to run your queries after the user selects an option in the Option Group,
just delete those lines. However, if you want to control the entry of
Suspension Days, leave the code in Case 3 as it is.
I need to be able to have a series of queries run at a particular
time, not when the user has finished inputting the values.
You can cause your queries to run at any time you want, either from an
AfterUpdate event from some other control or from a command button on your
form.