Is there a validaion rule for this?

J

jennywren03

Hello,

I was wondering if you could help me. I am a a brand new user of accsess and
am having to design a database for some coursework.

Basically, one of the field questions is 'whether or not a delegate will
attend a workshop' I have put this as a yes/no answer. However, there is only
a maximum of 10 people allowed to attend the workshop.
Is there a validation rule i can put in that will NOT make this field an
option once all 10 places have been filled?

Also (sorry to be a pain)
on another table i would like to make certain feilds avaliable... only if
certain options are chosen. i.e
they are given then option to select either
(delegate/exhibitor/chair/speaker/workshop presenter)
if they choose delegate or exhibitor, i would like the fields (work shop fee -
invoice or cheque - amount) to be avaliable. if they choose chair/speaker/
workshop presenter i would like ( travel cost reimbursment) to be avaliable ..
.. also all fields will required .... is there a way of doing this.. or is
this wishful thinking

thank you ever so much.. if you could get bk to me a.s.ap with any help, it
will be much appreciated
x-x-x
 
G

Guest

Hi,

No validation rule that I can think of; however, you could do something like
a DCount on a form and when you get up to 10 disallow any more entries for
that workshop. You could do this by setting the Locked property of some text
fields to Yes.

Actually I'd just pop up a message warning the data entry person that there
are already 10 people for that workshop and do they really, really want to
let in more people. About the time you get the 10 person limit hard coded
into the code, someone in damagement will say "We'll let in this extra person
just this time". Yea right. Or they will come up with different numbers for
various workshops.
 
T

Tim Ferguson

I was wondering if you could help me. I am a a brand new user of
accsess and am having to design a database for some coursework.

These are pretty nasty questions for a newcomer to db design,
particularly in Access which is only just up to the job.
Is there a validation rule i can put in that will NOT make this field
an option once all 10 places have been filled?

The latest version of Jet can apparently do this, with a table-level
constraint like this:

SELECT 11 > (
SELECT COUNT(*)
FROM Registrations a
WHERE a.CourseID = Registrations.CourseID
)

but getting Access to accept this takes some advanced trickery.

on another table i would like to make certain feilds avaliable... only
if certain options are chosen. i.e

These are also big design problems -- this is prompting structures like
supertyping/ subtyping; you also seem to be mentioning things like
TravelCosts and Reimbursements as fields when I would be thinking things
like tables or at least table.

Some kind of conditional appearance or disappearance can be created at
the application level (i.e. programming the forms) but even then you need
to have the correct tables design underneath.

Is your instructor (a) Joe Celko or (b) not very knowledgeable?

All the best


Tim F
 

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