Can I use subform to show 1:1 relationship ?

M

mscertified

Access Help files indicate I cannot but I wonder....

I have two tables in many to one relationship. Each row in main table can
however contain only one related record in child table. Main table is issues
and child table is client. An issue can have just one client but a client can
have many issues. I want my form bound to issue to show the client in a
subform (or is there a batter way?).

thanks for any help
 
A

Allen Browne

So you have a one-to-many relationshp between the Client table and the Issue
table. The Issue table will have fields such as:
IssueID primary key
ClientID Number relates to Client.ClientID
...

You can create a form where the issue is shown in the main form, and the
client info is displayed in the subform. But it could be quite a confusing
interface.

You cannot enter a new client in the subform, because the ClientID in the
subform inherits its value from the ClientID in the parent form, and the new
ClientID cannot exist in the related Issue table until after it is created
in the Issue form. Or if you can create a client in the subform, if you then
move the main form to a different issue and back again, you won't see the
client you created previously in the subform, because it was not tied to the
issue.
 
M

mscertified

My experiments have confirmed what you said. I also tried changing the record
source to be a join of issues and client and although it retrieves the issue
and client data ok, I am unable to add a new client record. So it looks like
the only solution is to have all the client fields unbound?
 

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