Hello,
Say for example I have the following table labeled Master:
ID: autornumber
Label: string
2nd, I have the following table labeled Slave:
ID: autonumber
Label: string
Xref: foreign key to Master.ID field
In other words, there is a one to many relationship between Master and Slave. In both tables, all fields are required.
3rd, I have a Master form with a Slave subform:
Master form:
ID: xxxxxxxxxxx
Label: xxxxxxxxxxxxxxxx
Slave subform:
ID: xxxxxxxxxxxx
Label: xxxxxxxxxxxxxxx
Xref: *** combo box ***
Finally, I need the Master form and Slave subform to have these properties:
(1) For every record in the master form, a corresponding record must exist in the subform, based on the Xref foreign key.
(2) I want to force the user to have to enter a Slave record at the same time they enter a Master record.
This is before the Master record is saved and data entry moves on to a new record.
(3) Also, I don't want the user to be able to go back to the Slave subform and delete all records.
In other words, there is always at least one record in the Slave subform for a corresponding Master form record based on the Xref foreign key.
(4) However, I want a delete button in the Master form that will delete all corresponding records in the Slave subform at the same time the Master record is deleted.
I am adverse to doing a lot of programming to accomplish the above because I don't know how this will affect other areas of my database based on Access 2007's "plumbing".
How instead can I use the "plumbing" to make implementing the above properties sound and robust?
Thanks kindly,
Craig
P.S. My client is adverse to me using a multivalued combo box because they don't want to "have to scan through 500 entries to get the one I want". A multivalued combo box would use a lot more of the plumbing of course. Is there a way, same as the single valued combo boxes, to enter text and have the combo box jump close to that entry in the drop down area? Would a scroll bar make the multivalued combo box practical? I think it would, quite personally, but I would care to hear other views on the subject.
P.S.S. Is it possible to use the List Items Edit Form property with a multivalued combo box?