Make entry into a field subform mandatory

aaron

New member
Local time
Today, 04:33
Joined
Aug 12, 2009
Messages
2
Hello all,

I have a database with three tables. The first contains applicant details. The second is an account table. The third is a payments table.

The data is all entered into the tables through a form, with a subform. The first tabbed page of the form contains all of the information about student details. The second tabbed page contains a subform 'finance' which when something is entered, creates a record in the finances table linked to the student. (the payments can then be entered below which links to the account).

What I want to do is to make it mandatory for someone to enter a field into the finances subform on the second tabbed page, so that every student has an account linked to them.

Does anyone have any ideas? All help will be greatly appreciated!
 
did you try it from the table design!
choose the field, go to the properties below(2003) or on the right(2007) go to Required, change it to yes!
if you want to do it in the form you need a code, in the OnExit of this subform, creat the error msg
other ways, just check the relationships between the tables!
or can you detail more things about how this system works?
thanks
 
Thanks for the reply.

I have tried it using the table design. It is currently set to required, but whereas this works for fields on the main form, it doesn't seem to do anything for fields on a subform.

For more details:

Tables

Students Primary field: ID (autonumber)
Account Primary field: Account ID (autonumber)
Finances Primary field: PaymentID (autonumber)

Relationships

Students ID (one) - (one) ID Account
Account Account ID (one) - (many) Account ID Payments

Data entry

Through student details form. Standard form with 2 tabbed pages.

Tab page 1 - student details (name, d/o/b etc.)
Tab page 2 - finance details (with subform)

Account subform - made up of account subform and payments subform

When a tuition fee is entered into the field of the account subform then it all works fine. The student has an account linked to him/her.

What I cannot seem to manage to do is to make this mandatory. At the moment if someone enters data into the first tabbed page of the form, then they can save and close without ever entering anything into the second tabbed page. I want something to open to say - please enter some finance details!
 

Users who are viewing this thread

Back
Top Bottom