Form and Sub form

S

sebastico

Hello comm.
I have a Library DB with four tables (in brakes the PK):
Author (AuID)
Books (ISNB)
Books/Author (ISBN-AuID)
Publisher (PubID)
The relationship is
Author and Book/Author 1 to many
Publisher and Books 1 to many
Books to Book/Author 1 to Many

I have the Publisher Form with the Subform Book and the subform Book/Author.
I also have the Form Author with the subform Book/Author

Could you tell me if it is possible to have the Form Publisher (with the
Subform Book and the subform Book/Author) and the Form Author (with the
subform Book/Author) in one Form?

Many thanks
 
K

KLZA

Hello comm.
I have a Library DB with four tables (in brakes the PK):
Author (AuID)
Books (ISNB)
Books/Author (ISBN-AuID)
Publisher (PubID)
The relationship is
Author and Book/Author 1 to many
Publisher and Books 1 to many
Books to Book/Author 1 to Many

I have the Publisher Form with the Subform Book and the subform Book/Author.
I also have the Form Author with the subform Book/Author

Could you tell me if it is possible to have the Form Publisher (with the
Subform Book and the subform Book/Author) and the Form Author (with the
subform Book/Author) in one Form?

Many thanks

Yes, create a query for each set of data you want to show and use the
PUBLISHER form's on open event to load the queries. Make sure the
record source for the form is blank and load the queries like below

Private Sub Form_Open(Cancel As Integer)
Forms![PUBLISHER]![PUBLISHER QUERY].Requery
Forms![PUBLISHER]![BOOK QUERY subform].Requery
Forms![PUBLISHER]![AUTHOR QUERY].Requery
Forms![PUBLISHER]![BOOK AUTHOR subform].Requery
End Sub
 
S

sebastico

Hi KLZA

Thank you very for your answer. I did what you suggested, however, when I
use the PUBLISHER FORM Microsoft Visual Basic display Run-time error 2425:
Microsoft Office can't find the field `PUBLISHER QUERY` referred to in your
expression.

How can I fix this error?

Thanks again

KLZA said:
Hello comm.
I have a Library DB with four tables (in brakes the PK):
Author (AuID)
Books (ISNB)
Books/Author (ISBN-AuID)
Publisher (PubID)
The relationship is
Author and Book/Author 1 to many
Publisher and Books 1 to many
Books to Book/Author 1 to Many

I have the Publisher Form with the Subform Book and the subform Book/Author.
I also have the Form Author with the subform Book/Author

Could you tell me if it is possible to have the Form Publisher (with the
Subform Book and the subform Book/Author) and the Form Author (with the
subform Book/Author) in one Form?

Many thanks

Yes, create a query for each set of data you want to show and use the
PUBLISHER form's on open event to load the queries. Make sure the
record source for the form is blank and load the queries like below

Private Sub Form_Open(Cancel As Integer)
Forms![PUBLISHER]![PUBLISHER QUERY].Requery
Forms![PUBLISHER]![BOOK QUERY subform].Requery
Forms![PUBLISHER]![AUTHOR QUERY].Requery
Forms![PUBLISHER]![BOOK AUTHOR subform].Requery
End Sub
 
S

sebastico

Please

Any of you could help me to fix the error indicated below. On the other
hand, when I click "Read and rate the response" in my email inbox I can not
get into the Discussion Group page

Many thanks

sebastico said:
Hi KLZA

Thank you very for your answer. I did what you suggested, however, when I
use the PUBLISHER FORM Microsoft Visual Basic display Run-time error 2425:
Microsoft Office can't find the field `PUBLISHER QUERY` referred to in your
expression.

How can I fix this error?

Thanks again

KLZA said:
Hello comm.
I have a Library DB with four tables (in brakes the PK):
Author (AuID)
Books (ISNB)
Books/Author (ISBN-AuID)
Publisher (PubID)
The relationship is
Author and Book/Author 1 to many
Publisher and Books 1 to many
Books to Book/Author 1 to Many

I have the Publisher Form with the Subform Book and the subform Book/Author.
I also have the Form Author with the subform Book/Author

Could you tell me if it is possible to have the Form Publisher (with the
Subform Book and the subform Book/Author) and the Form Author (with the
subform Book/Author) in one Form?

Many thanks

Yes, create a query for each set of data you want to show and use the
PUBLISHER form's on open event to load the queries. Make sure the
record source for the form is blank and load the queries like below

Private Sub Form_Open(Cancel As Integer)
Forms![PUBLISHER]![PUBLISHER QUERY].Requery
Forms![PUBLISHER]![BOOK QUERY subform].Requery
Forms![PUBLISHER]![AUTHOR QUERY].Requery
Forms![PUBLISHER]![BOOK AUTHOR subform].Requery
End Sub
 

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