Subform or not to Subform

G

Guest

Hi people,

I created a form where data is entered by the user - about a customer. The
form has a lot of information and it takes up the whole page. I then created
a subform and linked the information I needed and it looks good - or should I
say it looks correct. The problem is when I print or when i do a print
preview - I KNOW FORMS ARE NOT MADE FOR PRINTING - but in this case I need
some of these forms printed (dont ask). My question is is there any way I
can have the subform on another page??? (Please dont make fun of me - I am
so new at this I am amazed I got as far as I did.) If not what else can I do?
If someone answers please give me details and step by step on what to do if
possible.

thanks in advance for your help

B
 
G

Guest

Subforms are usually used when there is a one to many relationship between
two tables. For example, lets say you have a database of pet owners. You
would have a table that contains information of the people who own the pets.
Since a person may own one or many pets, you would need a table of pets. The
two tables would be related by storing the owner record's primary key value
in the pet records for all the pets she owns.

In this case, the form would be used for the owners, and the subform would
be used for the pets so that each time you navigate to an owner record, the
subform would display all the pets that person owns.

With out more info about your tables, it would be difficult to give you
specific advice. If all your customer data is in one table, it needs to be
 
G

Guest

Hi,

My first form has all the applicants information - the second form (subform)
had the applicants first name and last name - these I linked to the main form
(and it works fine) then also in the subform I have a date field and a claims
field - where I enter the date and any claims that customer has etc.

Like I said before this works fine but I need to be able to print the main
form without all the subform infomation showing up - now this is probably
wrong but I need the mainform (all the pages) to be in tact - I need to be
able to print out the whole page (know what I mean?) So can create a button
to make the sub form pop up when I need it - or should I just create another
form and do the relationship thing so it can work? I need the information -
first name and last name to be the same on both forms if I have to create a
separate form (again with a button). I am sorry I am not using the correct
language here but I know very little about access and its terminology.

Once again thanks for your help
 
G

Guest

As to printing the form, why not build a report that has the data you want to
present? Your forms should be designed around viewing and entering data, not
whether they will print like you want them.

Now, you have confused me a bit. Your original post mentioned a subform,
but in the more recent post, it sounds like a completely different form. A
sub form is a different beast. It is the Source Object of a subform control
on a form. It opens with the form and presents records in a child table to
the underlying table of the main form. If you are opening a second form from
the first, it is not a subform.
 
G

Guest

I am sorry about the confusion - I tried it both ways to see which one would
be better or should I say easier. With the subform it was easy because the
information was linked and I could see it right there on the screen but the
problem was when the user wanted to print the main form. So I tried to create
another form and do the relationship thing - however I cant figure out how to
get the main form information to appear automatically - or should I say to
have the same customer show up on both forms - I tried queries - I tried
everything - but I just cant get it to work - as I said I am new and not very
good at this

thank you for your time and patience with me!!!!
 
G

Guest

If you want to open a form to a specific record, use the Where argument of
the OpenForm method to specify which record to use. There is a good example
in VBA Help, just search for OpenForm.

Again, forget about how a form will print. Make the form work with the
data. Create a report to print the data from the form. The OpenReport method
also has a Where argument that works just like the OpenForm Where argument.
This will allow you to print a report that includes only the current record.
You will doing yourself and your users a big favor if you take this approach.
 
J

John Spencer

IF you want to hide the subform when you print the main form, you can do
that with the Display When property of the subform control. You can set the
Display when to Screen Only.

Having the subform print on a separate page would not work.

You know you can set up a report that looks exactly like a form (and the
subform).

In the database window, click on the Right-click on the Form name and select
Save As. Then in the dialog, change Form to Report.
Now open up the newly saved report and move the subform to whatever position
you want it to print in. Add a page break control in front of the subform.
 

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

Similar Threads


Top