I have read some other postings on this, but I am still stuck! I am trying to design a data entry form that will allow people to enter multiple insurance codes into the same field. I have seen advice that suggests that I make a new table and put it in a subform. I am confused about how I would do this. Would the subform (and the underlying table) have several spaces where people would enter codes? And what if I have no single unique identifier in my main table (unless I use Autonumber)? And wouldn't this complicate things if people wanted to search the table for a code or a combination of codes?
Any help would be greatly appreciated!
llkhoutx
04-05-2001, 06:55 AM
The subform would be a datasheet so as to display multiple records. The subform has a foreign key which is linked to the autonumber field of your main form. A query can be built to seek multiple codes at one time.
when you say that the subform has a foreign key, do you mean that the table that the subform is based on would have a foreign key? I tried to link the two tables on the ID number (autonumber) field, and I thought that I should try to "enforce referential integrity" and have cascading updates. But Access will not let me do this (gives me an invalid field definition error). Should I even be trying to have a cascading update?
An update: I was able to add a subform to my form and populated it with test data. I can see that I have been able to enter more than one code per record number. So far, so good. However, when I attempt to use a filter by form to search on specific codes, I am not getting anything. What am I doing wrong? Can you not use filter by form with a subform?
[This message has been edited by LQ (edited 04-05-2001).]