M
Michelle F
Hi All! I have two subform issues.
1. My main form is an activity entry from where the user can add an activity
for a specific project number. I have added a subform to display document(s)
(if any) associated with the project. The projects and documents are linked
through the documents table (i.e. each document is associated with one
project, but each project can have more than one document). I want the
subform to NOT appear if there are NOT any documents associated with that
project. But, with the way the relationship is defined, I am not figuring
out how to do this. The best I can do is add the documents field to my form,
but then I end up with repeat activity entries for each project associated
with more than one document (i.e. Project A has 2 Documents, so main form
shows 2 entries for Activity A of Project A and 2 entries for Activity B for
Project B). If I don't add the document field to the form, the subform
displays the correct data (and no repeats) but insists on displaying even
when no documents present. I would like code like
Me.sfrmProjectDocuments.Visible = Not IsEmpty(Me.DocumentNumber)
but since I cannot put the DocumentNumber field in my main form without
causing repeats, I am at a loss.
2. Much shorter second question. I would like to make a subform pop-up
instead of being embedded. I set the "pop-up" property to yes, which makes
it pop up if I open it as a subform only, but it remains embedded in the main
form.
Thank you all very much!
1. My main form is an activity entry from where the user can add an activity
for a specific project number. I have added a subform to display document(s)
(if any) associated with the project. The projects and documents are linked
through the documents table (i.e. each document is associated with one
project, but each project can have more than one document). I want the
subform to NOT appear if there are NOT any documents associated with that
project. But, with the way the relationship is defined, I am not figuring
out how to do this. The best I can do is add the documents field to my form,
but then I end up with repeat activity entries for each project associated
with more than one document (i.e. Project A has 2 Documents, so main form
shows 2 entries for Activity A of Project A and 2 entries for Activity B for
Project B). If I don't add the document field to the form, the subform
displays the correct data (and no repeats) but insists on displaying even
when no documents present. I would like code like
Me.sfrmProjectDocuments.Visible = Not IsEmpty(Me.DocumentNumber)
but since I cannot put the DocumentNumber field in my main form without
causing repeats, I am at a loss.
2. Much shorter second question. I would like to make a subform pop-up
instead of being embedded. I set the "pop-up" property to yes, which makes
it pop up if I open it as a subform only, but it remains embedded in the main
form.
Thank you all very much!