473,406 Members | 2,713 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Field displays depending on another table field value

G'day from Australia,

I'm hoping some bright spark may be able to help me with this one. I'm
sure that it can be done, I've just hit a wall with it. So I'm opening
it up.

I'm storing student competencies for a given number of performance
criteria (which are stored in a separate reference table).
Students are rated competent or not (yes/no field) on up to 5
assessments - Task, Observation, Project, Practical Test, Exam for
each performance criteria.

But for any given performance criteria, an assessment may not be used
to assess competency so I don't want it to display on the data entry
form (with two subforms - student and performance criteria)

Example:
Competencies table:
StudentID(PK/FK), PerformanceCriteriaID(PK/FK), Task (Yes/No), Project
(Yes/No), Obs (Yes/No), PracTest (Yes/No), Exam (Yes/No)

Sample Data in the table:
StudentID, PerformanceCriteriaID, Task, Project, Obs, PracTest, Exam
5432, 16, -1, -1, -1, 0, -1
5432, 23, -1, -1, -1, -1, 0

In this example, the field PracTest for student 5432 contains a zero
(not because the student isn't competent on Performance Criteria 16,
but because a PracTest is not used to assess this competency). I
don't want a user to accidentally tick a checkbox for this performance
criteria for a PracTest if a PracTest is not used to assess the
Performance Criteria.

But student 5432 could have a zero recorded for the Exam assessment
on Performance Criteria 23 because they do not have competency and the
staff member has not ticked the checkbox (which is displayed in this
instance)
What I considered was a separate table that determined (using yes/no
fields) whether an assessment was to be displayed or not (for that
PerformnceCriteriaID), then somehow query this table when the record
was being displayed on the data entry form (which is displaying
continuous forms) and use the visible property for the field control.

It would be cool if there was a datatype that handled three values -
yes/no/not used.

Does anyone have any bright ideas that I could progress with?
I would be most grateful for some inkling on how to proceed.

I have a database if anyone needs a copy to see where I'm at so far.
Probably not wise for it to be posted with this message. So I assume
if anyone needs it they will tell me how to send it to them.

Cheers
David :-)

Brisbane
Australia
Feb 11 '07 #1
2 4779
Hi David.

Your conclusion suggests that you need a field that can contain 3 states:
Yes/No/Not used. You can do that in Access is you use a Number field (size
Integer), and interface it with a check box. Set the Triple State property
of the check box to Yes, and it now has 3 states: Yes (-1), No (0), and Not
Applicable (Null.) If you are using Windows XP, there may not be any visual
distinction between No and Null unless you uncheck the option under:
Tools | Options | Forms/Reports | Use Themed

But there's a more basic issue here: the data structure. One performance
criterion can have multiple assessments. This should be handled as 2 tables
with a one-to-many relation instead of as multiple check boxes in the one
table. (In typical competency-based training, an assessment may assess
multiple elements/outcomes, each with multiple criteria, so the structure
may actually be a bit more involve than just that.) Once you get the
structure right, you can then teach the database which actual
critiera/assessments are matched, and therefore which ones apply when an
actual assessment is submitted.

Once the data structure is correct, you can then worry about how to
interface it. That might end up being a form with a subform to handle the
related records.

If you want to continue with the approach you already have instead, the
triple state check box will allow you to use Null for N/A. Unlike zeros, the
nulls don't affect averages. And you could run some checks in
Form_BeforeUpdate to ensure that there's no 0 or -1 in a field that should
be null. While tha'ts possible, it is not structurally correct, and so it is
harder to write, maintain, and query.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"David - Australia" wrote in message
news:rg********************************@4ax.com...
G'day from Australia,

I'm hoping some bright spark may be able to help me with this one. I'm
sure that it can be done, I've just hit a wall with it. So I'm opening
it up.

I'm storing student competencies for a given number of performance
criteria (which are stored in a separate reference table).
Students are rated competent or not (yes/no field) on up to 5
assessments - Task, Observation, Project, Practical Test, Exam for
each performance criteria.

But for any given performance criteria, an assessment may not be used
to assess competency so I don't want it to display on the data entry
form (with two subforms - student and performance criteria)

Example:
Competencies table:
StudentID(PK/FK), PerformanceCriteriaID(PK/FK), Task (Yes/No), Project
(Yes/No), Obs (Yes/No), PracTest (Yes/No), Exam (Yes/No)

Sample Data in the table:
StudentID, PerformanceCriteriaID, Task, Project, Obs, PracTest, Exam
5432, 16, -1, -1, -1, 0, -1
5432, 23, -1, -1, -1, -1, 0

In this example, the field PracTest for student 5432 contains a zero
(not because the student isn't competent on Performance Criteria 16,
but because a PracTest is not used to assess this competency). I
don't want a user to accidentally tick a checkbox for this performance
criteria for a PracTest if a PracTest is not used to assess the
Performance Criteria.

But student 5432 could have a zero recorded for the Exam assessment
on Performance Criteria 23 because they do not have competency and the
staff member has not ticked the checkbox (which is displayed in this
instance)
What I considered was a separate table that determined (using yes/no
fields) whether an assessment was to be displayed or not (for that
PerformnceCriteriaID), then somehow query this table when the record
was being displayed on the data entry form (which is displaying
continuous forms) and use the visible property for the field control.

It would be cool if there was a datatype that handled three values -
yes/no/not used.

Does anyone have any bright ideas that I could progress with?
I would be most grateful for some inkling on how to proceed.

I have a database if anyone needs a copy to see where I'm at so far.
Probably not wise for it to be posted with this message. So I assume
if anyone needs it they will tell me how to send it to them.

Cheers
David :-)

Brisbane
Australia
Feb 11 '07 #2
Wow that was fast Allen,

I see what you mean about my structure. I might look more closely at
your suggestion since it appears to be more easily updateable, and if
this works for my subject, others may want to use it. We're currrently
using spreadsheets which are a severe nuisance.

For ease of data entry I wanted checkboxes to be used by staff, but I
think that's still achievable using your suggestion.

Thank you for you help.

David
Brisbane

On Sun, 11 Feb 2007 19:49:02 +0900, "Allen Browne"
<Al*********@SeeSig.Invalidwrote:
>Hi David.

Your conclusion suggests that you need a field that can contain 3 states:
Yes/No/Not used. You can do that in Access is you use a Number field (size
Integer), and interface it with a check box. Set the Triple State property
of the check box to Yes, and it now has 3 states: Yes (-1), No (0), and Not
Applicable (Null.) If you are using Windows XP, there may not be any visual
distinction between No and Null unless you uncheck the option under:
Tools | Options | Forms/Reports | Use Themed

But there's a more basic issue here: the data structure. One performance
criterion can have multiple assessments. This should be handled as 2 tables
with a one-to-many relation instead of as multiple check boxes in the one
table. (In typical competency-based training, an assessment may assess
multiple elements/outcomes, each with multiple criteria, so the structure
may actually be a bit more involve than just that.) Once you get the
structure right, you can then teach the database which actual
critiera/assessments are matched, and therefore which ones apply when an
actual assessment is submitted.

Once the data structure is correct, you can then worry about how to
interface it. That might end up being a form with a subform to handle the
related records.

If you want to continue with the approach you already have instead, the
triple state check box will allow you to use Null for N/A. Unlike zeros, the
nulls don't affect averages. And you could run some checks in
Form_BeforeUpdate to ensure that there's no 0 or -1 in a field that should
be null. While tha'ts possible, it is not structurally correct, and so it is
harder to write, maintain, and query.
Feb 11 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: A.J.M. van Rijthoven | last post by:
I have a table instrumenten (INSID Instrumentname, CATID), a table Categorie (CATID, Categorydescription), Netten (NETID, description of net) and a table (kpltblinstrument) that links the...
4
by: N. Graves | last post by:
Hello... thank you for your time. I have a form that has a List box of equipotent records and a sub form that will show the data of the equipment select from the list box. Is it possible to...
25
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the...
5
by: sparks | last post by:
After trying a combo box to do this. its tied to a lookup table name value yes 1 no 0 they wanted to be able to type in a 1 but display a yes in the field. and store a 1 in the...
6
by: jean.ulrich | last post by:
Hi I have a form that is not related with a table neither a query (unbound form) On this form I have a text field where the user can put a text or a number As I dont want to create a table...
1
by: alexsg | last post by:
A little while ago Ron P kindly responded to my inquiry on how to copy the first line of memo field into a text field, using a query: left(,instr(1,,vbCrLf)-1) This is great, but I would like...
9
by: sellcraig | last post by:
Microsoft access 2 tables table "data main" contains a field called "code" table "ddw1" is created from a make table query of "data main" Goal- the data in "code" field in needs to...
8
by: AA Arens | last post by:
Hi I do have a products table and products-parts table in my Access 2003 database and log all services into a form. I do have at least the following two combo boxes on my form: - Choose...
1
by: MLH | last post by:
I have a form used as a subform on frmCreateInvoice. It is displayed in datasheet view in the subform control. It displays a few text fields, a boolean field (shown as a checkbox control) and a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.