By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,121 Members | 1,782 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,121 IT Pros & Developers. It's quick & easy.

Help wanted: what source code to use with form field rules

P: n/a
Any help would be appreciated to solve the following simple problem that
I will describe.

***

There is a form called "red chocolate form".
The form has a particular subform field that has a checkmark box that is
selectable as on or off (on if there is a checkmark inside it).

The table that contains the data for the form is known as "red chocolate
table".
The table has a field name known as "sweetener".
The datatype for the sweeter field is Yes/No.

Thus if there appears a checkmark in the form "red chocolate form" where the
checkmark box is, this means the record contains sweetener".

**

Right now if I select the field name known as "sweetener" from within the
design view of my table known as "red chocolate table", I can see the
General Properties has as the Default Value of "True".

It used to be "False", however I changed it to True so that everytime a new
record was added using a different form, the "sweetener" would be selected
as default.

The problem right now is that everytime a new sub record is added, I don't
want
"sweetener" selected by default. Its acceptable if everyime a primary
record is
added sweetener is selected by default, however not when a record is added
from the subform.

The form that indicates whether or not there is a sweetener contains a
subform for
the same primary record whereby additional information can be added via the
subform, and since the subform contains the checkbox for "sweetener" within
the
form-- it is automatically set to be true and is selected.

The primary information has a ID number that remains the same even though
different subform data can be added, thus maybe somehow if the validation
rule
or default value contains an expression that monitors the ID number to see
if its
the same ID number as the previous entries within the ID numbers then it
won't
select "true" by default.

I only want it to be true if its an entirely new primary record that is
added to the
table, and not a new subform record. Is there any rule or expression I can
type
into the default value line or validation rule for the field name sweetener
?

From the form level there should only be a maximum of 1 true value per ID
number, unless ofcourse its modified from the table level.
Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
If the Sweetner Field is in the Table whose data is RecordSource for the
main form, why would you put the Check Box for that Field in a Form embedded
in a Subform Control. Those are normally, and properly, used to show Records
that are related to the Records in the main Form, not data that resides in
the main Form Record.

Could you clarify what data you are displaying where? Without that
information, we aren't likely to be able to be of much help.

Larry Linson
Microsoft Access MVP
"Earthling" <in******@earthplanet09087.com> wrote in message
news:vE******************@twister01.bloor.is.net.c able.rogers.com...
Any help would be appreciated to solve the following simple problem that
I will describe.

***

There is a form called "red chocolate form".
The form has a particular subform field that has a checkmark box that is
selectable as on or off (on if there is a checkmark inside it).

The table that contains the data for the form is known as "red chocolate
table".
The table has a field name known as "sweetener".
The datatype for the sweeter field is Yes/No.

Thus if there appears a checkmark in the form "red chocolate form" where the checkmark box is, this means the record contains sweetener".

**

Right now if I select the field name known as "sweetener" from within the
design view of my table known as "red chocolate table", I can see the
General Properties has as the Default Value of "True".

It used to be "False", however I changed it to True so that everytime a new record was added using a different form, the "sweetener" would be selected
as default.

The problem right now is that everytime a new sub record is added, I don't
want
"sweetener" selected by default. Its acceptable if everyime a primary
record is
added sweetener is selected by default, however not when a record is added
from the subform.

The form that indicates whether or not there is a sweetener contains a
subform for
the same primary record whereby additional information can be added via the subform, and since the subform contains the checkbox for "sweetener" within the
form-- it is automatically set to be true and is selected.

The primary information has a ID number that remains the same even though
different subform data can be added, thus maybe somehow if the validation
rule
or default value contains an expression that monitors the ID number to see
if its
the same ID number as the previous entries within the ID numbers then it
won't
select "true" by default.

I only want it to be true if its an entirely new primary record that is
added to the
table, and not a new subform record. Is there any rule or expression I can type
into the default value line or validation rule for the field name sweetener ?

From the form level there should only be a maximum of 1 true value per ID
number, unless ofcourse its modified from the table level.

Nov 12 '05 #2

P: n/a

"Larry Linson" <bo*****@localhost.not> wrote in message
news:F1******************@nwrddc02.gnilink.net...
Comments: This message did not originate from the Sender address above.
It was remailed automatically by anonymizing remailer software.


Please ignore this posting.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Nov 12 '05 #3

P: n/a
"Tony Toews" <to**********@yahoo.com> wrote:
X-Abuse-Report: ab***@teranews.com


Forged posting.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.