Skip Required related field?

N

niuginikiwi

I have a Order and Order Details as form/subform both based on two different
queries with several tables

On the subform, have a combo box that is field called Pack and is bound to
PackID from tblPack.
What I want to do is find a way to not select a value from that combo but
carry on with more Order Lines but select a value at a later stage...

How can I do that?
I have looked at the relationship referential integrity and the required
property of the field but I am obvously missing something out...

Can any let me know how i can achieve this?

Thanks
 
R

Rick Brandt

niuginikiwi said:
I have a Order and Order Details as form/subform both based on two
different queries with several tables

On the subform, have a combo box that is field called Pack and is
bound to PackID from tblPack.
What I want to do is find a way to not select a value from that combo
but carry on with more Order Lines but select a value at a later
stage...

How can I do that?
I have looked at the relationship referential integrity and the
required property of the field but I am obvously missing something
out...

Can any let me know how i can achieve this?

Thanks

You can't. Since subform records are saved to disk as you move from one to
the next then any rules about required fields have to be enforced at the
time the save is performed.

If your main form had some sort of button for "posting" an order or some
such then you could run code behind that button that would test the validity
of all sub-records and display a message about any that were not valid, but
you cannot have the database engine enforce those rules.
 
K

KARL DEWEY

You might try to add a record in the [tblPack].[PackID] to prompt later that
your selection is phony.
 
N

niuginikiwi

Thanks Rick,
I have thought so but again, you never know as a newbie so as I got the
question up. I will scrap the idea of skipping the related fields, and get
the data entry person to select a value as they go but can come back later
and update if there are changes....

Thanks,
 

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