embeded forms

G

Guest

I have a "Stock" form that is based on a Query of the Stock Table and a
couple of other Tables. I have embeded that form in another form that is
based on a Cusomer Table and linked the query to an Unbound text box. When I
put a stock item into the Text Box, I think that it should displat the record
in the embeded form. However, even though the Query and the Form display the
correct record info if I open them, The Embeded form stays blank, What am I
doing wrong, can anyone help please?
e.g Query based on Stock Table (and others), Form Based on Query, Embeded
form based on Form.

Thanks Ray C
 
G

Guest

Hi Ray,

By embedded form I take it you are speaking of a subform. In order for a
subform and a master form (the form containing the subform) to be syncronized
they must be linked.

If they are not linked you can do it by opening the master form in Design
View. Next, right click on the border or edge of the subform. When the menu
appears select Properties. Click on the Data Tab.

You should see

Source Object YourSubFormName
Link Child Fields
Link Master Fields

If there is nothing beside the Link Child Fields and the Link Master Fields,
then you need to create the link.

To do this, right click to the far right of Link Child Fields. In the menu
that appears Select Build. A dialogue box should open that will help you
select a common field to link both forms. You can even let Access suggest
the fields for you.

The link fields need to be the same field for both forms.

If that is not the problem, then someone with more expertise that I needs to
help you.

Regards,
Hunter57
http://churchmanagementsoftware.googlepages.com
 
G

Guest

Thanks for the reply. First my apologies, I forgot to say that he "SubForm"
is on a tab. I feel prety sure that this is not the problem as I set up for
the program to Make Visible and Set Focus all of the Tabs in turn and they
all display correctly. When I get to the Tab with the embeded subForm, all
that displays is the border and a blank area.
I can not use your Master and Child method of linking because the Sub form
and the Mater Form do not have the same Fields To link. My Master Form is
Based on the Customers Table and my Sub Form is based on the Stock Table. I
have an Unbound Text Box in the Main Form that is called "FindSerialNo". In
the Criteria of the Query I have "[Forms]![frm_MainForm]![findSerialNo]".
When I enter a valid Serial No in the FindSerialNo Text Box, the Query (that
is Based on the Stock table) finds and displays the correct record, the
QueryForm 9that is based on the Query)finds and displays the correct record
bur the SubForm (that is based on the QueryForm remains blank.
Thanks RayC
 
G

Guest

Hi Ray,

Whan a customer buys a stock, how do you know stock the customer bought?
Surely there is some field in common linking the two tables. unless you are
using another table to which both the Customer and the Stock Table relate.

When you open the relationship window do you see a line connecting the two
tables? If so, then your tables have a field in common.

Or do you see another table to which both the Customer Table and Stock Table
are related?

Do you have a StockID or StockName field in your Customer Table? Or do you
have a CustomerID or CustomerName field in your Stock table?

If not, Here is how you can link the forms. Open your Customer Table in
Design view and add a new field with the same name as the Primary Key Field
in the Stock Table (StockID or whatever it is named). [Note: you could do
it the other way and add a CustomerID field to the Stock Table.]

You will then need to fill the StockID field in the Customer's Table with
the appropriate data from the Stock Table.

Next, open the relationships window and drag the StockID field from the
Stock Table to the StockID field in the Customers Table.

After that you can then link the subform to the main form using the
instructions I gave you earlier.

Wish you the best
Hunter57

Ray C said:
Thanks for the reply. First my apologies, I forgot to say that he "SubForm"
is on a tab. I feel prety sure that this is not the problem as I set up for
the program to Make Visible and Set Focus all of the Tabs in turn and they
all display correctly. When I get to the Tab with the embeded subForm, all
that displays is the border and a blank area.
I can not use your Master and Child method of linking because the Sub form
and the Mater Form do not have the same Fields To link. My Master Form is
Based on the Customers Table and my Sub Form is based on the Stock Table. I
have an Unbound Text Box in the Main Form that is called "FindSerialNo". In
the Criteria of the Query I have "[Forms]![frm_MainForm]![findSerialNo]".
When I enter a valid Serial No in the FindSerialNo Text Box, the Query (that
is Based on the Stock table) finds and displays the correct record, the
QueryForm 9that is based on the Query)finds and displays the correct record
bur the SubForm (that is based on the QueryForm remains blank.
Thanks RayC


Hunter57 said:
Hi Ray,

By embedded form I take it you are speaking of a subform. In order for a
subform and a master form (the form containing the subform) to be syncronized
they must be linked.

If they are not linked you can do it by opening the master form in Design
View. Next, right click on the border or edge of the subform. When the menu
appears select Properties. Click on the Data Tab.

You should see

Source Object YourSubFormName
Link Child Fields
Link Master Fields

If there is nothing beside the Link Child Fields and the Link Master Fields,
then you need to create the link.

To do this, right click to the far right of Link Child Fields. In the menu
that appears Select Build. A dialogue box should open that will help you
select a common field to link both forms. You can even let Access suggest
the fields for you.

The link fields need to be the same field for both forms.

If that is not the problem, then someone with more expertise that I needs to
help you.

Regards,
Hunter57
http://churchmanagementsoftware.googlepages.com
 
G

Guest

Whilst I do have a Hire Contract Number that links the CustomerTable and the
Stock Table, I don't have that available in the scenario I am trying to
achieve.
I guess that the answer is to re-think the way I am diong this but what I am
trying to acheive is to open the Main Form (that is based on the Customer
Table), hide all the Customer info (all Text Boxes ".Visible = False"), open
up an Unbound Box called FindSerialNo and allow the user to search the Stock
Table for a piece of equipment, If the equipment is found, the Main Form will
display all of the information related to the customer who is currently
hiring it allong with all the other items of Stock that are booked out to
that same customer (that bit is aready written and works from a ContreactNo
eneuiry). If not, I would go on to create a new record in the Stock Table.
As I said, I probably need to rethink how I do this.
Thank you so much for your kind help. Regards RayC



Hunter57 said:
Hi Ray,

Whan a customer buys a stock, how do you know stock the customer bought?
Surely there is some field in common linking the two tables. unless you are
using another table to which both the Customer and the Stock Table relate.

When you open the relationship window do you see a line connecting the two
tables? If so, then your tables have a field in common.

Or do you see another table to which both the Customer Table and Stock Table
are related?

Do you have a StockID or StockName field in your Customer Table? Or do you
have a CustomerID or CustomerName field in your Stock table?

If not, Here is how you can link the forms. Open your Customer Table in
Design view and add a new field with the same name as the Primary Key Field
in the Stock Table (StockID or whatever it is named). [Note: you could do
it the other way and add a CustomerID field to the Stock Table.]

You will then need to fill the StockID field in the Customer's Table with
the appropriate data from the Stock Table.

Next, open the relationships window and drag the StockID field from the
Stock Table to the StockID field in the Customers Table.

After that you can then link the subform to the main form using the
instructions I gave you earlier.

Wish you the best
Hunter57

Ray C said:
Thanks for the reply. First my apologies, I forgot to say that he "SubForm"
is on a tab. I feel prety sure that this is not the problem as I set up for
the program to Make Visible and Set Focus all of the Tabs in turn and they
all display correctly. When I get to the Tab with the embeded subForm, all
that displays is the border and a blank area.
I can not use your Master and Child method of linking because the Sub form
and the Mater Form do not have the same Fields To link. My Master Form is
Based on the Customers Table and my Sub Form is based on the Stock Table. I
have an Unbound Text Box in the Main Form that is called "FindSerialNo". In
the Criteria of the Query I have "[Forms]![frm_MainForm]![findSerialNo]".
When I enter a valid Serial No in the FindSerialNo Text Box, the Query (that
is Based on the Stock table) finds and displays the correct record, the
QueryForm 9that is based on the Query)finds and displays the correct record
bur the SubForm (that is based on the QueryForm remains blank.
Thanks RayC


Hunter57 said:
Hi Ray,

By embedded form I take it you are speaking of a subform. In order for a
subform and a master form (the form containing the subform) to be syncronized
they must be linked.

If they are not linked you can do it by opening the master form in Design
View. Next, right click on the border or edge of the subform. When the menu
appears select Properties. Click on the Data Tab.

You should see

Source Object YourSubFormName
Link Child Fields
Link Master Fields

If there is nothing beside the Link Child Fields and the Link Master Fields,
then you need to create the link.

To do this, right click to the far right of Link Child Fields. In the menu
that appears Select Build. A dialogue box should open that will help you
select a common field to link both forms. You can even let Access suggest
the fields for you.

The link fields need to be the same field for both forms.

If that is not the problem, then someone with more expertise that I needs to
help you.

Regards,
Hunter57
http://churchmanagementsoftware.googlepages.com

:

I have a "Stock" form that is based on a Query of the Stock Table and a
couple of other Tables. I have embeded that form in another form that is
based on a Cusomer Table and linked the query to an Unbound text box. When I
put a stock item into the Text Box, I think that it should displat the record
in the embeded form. However, even though the Query and the Form display the
correct record info if I open them, The Embeded form stays blank, What am I
doing wrong, can anyone help please?
e.g Query based on Stock Table (and others), Form Based on Query, Embeded
form based on Form.

Thanks Ray C
 
G

Guest

Hi Ray,

"I guess that the answer is to re-think the way I am diong this . . ."

Databases have a way of doing that to us, don't they?

I am not sure this would help but you could make the Stock Form the main
form and the Customer Form the Subform. Link them together using the Hire
Contract Number field. Use your FindSerialNo Combo Box to open the Stock
Form to the record you need and the Customer subform should display all
customer records that have the corresponding Hire Contract Number.

Does that help?

Hunter57








Ray C said:
Whilst I do have a Hire Contract Number that links the CustomerTable and the
Stock Table, I don't have that available in the scenario I am trying to
achieve.
I guess that the answer is to re-think the way I am diong this but what I am
trying to acheive is to open the Main Form (that is based on the Customer
Table), hide all the Customer info (all Text Boxes ".Visible = False"), open
up an Unbound Box called FindSerialNo and allow the user to search the Stock
Table for a piece of equipment, If the equipment is found, the Main Form will
display all of the information related to the customer who is currently
hiring it allong with all the other items of Stock that are booked out to
that same customer (that bit is aready written and works from a ContreactNo
eneuiry). If not, I would go on to create a new record in the Stock Table.
As I said, I probably need to rethink how I do this.
Thank you so much for your kind help. Regards RayC



Hunter57 said:
Hi Ray,

Whan a customer buys a stock, how do you know stock the customer bought?
Surely there is some field in common linking the two tables. unless you are
using another table to which both the Customer and the Stock Table relate.

When you open the relationship window do you see a line connecting the two
tables? If so, then your tables have a field in common.

Or do you see another table to which both the Customer Table and Stock Table
are related?

Do you have a StockID or StockName field in your Customer Table? Or do you
have a CustomerID or CustomerName field in your Stock table?

If not, Here is how you can link the forms. Open your Customer Table in
Design view and add a new field with the same name as the Primary Key Field
in the Stock Table (StockID or whatever it is named). [Note: you could do
it the other way and add a CustomerID field to the Stock Table.]

You will then need to fill the StockID field in the Customer's Table with
the appropriate data from the Stock Table.

Next, open the relationships window and drag the StockID field from the
Stock Table to the StockID field in the Customers Table.

After that you can then link the subform to the main form using the
instructions I gave you earlier.

Wish you the best
Hunter57

Ray C said:
Thanks for the reply. First my apologies, I forgot to say that he "SubForm"
is on a tab. I feel prety sure that this is not the problem as I set up for
the program to Make Visible and Set Focus all of the Tabs in turn and they
all display correctly. When I get to the Tab with the embeded subForm, all
that displays is the border and a blank area.
I can not use your Master and Child method of linking because the Sub form
and the Mater Form do not have the same Fields To link. My Master Form is
Based on the Customers Table and my Sub Form is based on the Stock Table. I
have an Unbound Text Box in the Main Form that is called "FindSerialNo". In
the Criteria of the Query I have "[Forms]![frm_MainForm]![findSerialNo]".
When I enter a valid Serial No in the FindSerialNo Text Box, the Query (that
is Based on the Stock table) finds and displays the correct record, the
QueryForm 9that is based on the Query)finds and displays the correct record
bur the SubForm (that is based on the QueryForm remains blank.
Thanks RayC


:

Hi Ray,

By embedded form I take it you are speaking of a subform. In order for a
subform and a master form (the form containing the subform) to be syncronized
they must be linked.

If they are not linked you can do it by opening the master form in Design
View. Next, right click on the border or edge of the subform. When the menu
appears select Properties. Click on the Data Tab.

You should see

Source Object YourSubFormName
Link Child Fields
Link Master Fields

If there is nothing beside the Link Child Fields and the Link Master Fields,
then you need to create the link.

To do this, right click to the far right of Link Child Fields. In the menu
that appears Select Build. A dialogue box should open that will help you
select a common field to link both forms. You can even let Access suggest
the fields for you.

The link fields need to be the same field for both forms.

If that is not the problem, then someone with more expertise that I needs to
help you.

Regards,
Hunter57
http://churchmanagementsoftware.googlepages.com

:

I have a "Stock" form that is based on a Query of the Stock Table and a
couple of other Tables. I have embeded that form in another form that is
based on a Cusomer Table and linked the query to an Unbound text box. When I
put a stock item into the Text Box, I think that it should displat the record
in the embeded form. However, even though the Query and the Form display the
correct record info if I open them, The Embeded form stays blank, What am I
doing wrong, can anyone help please?
e.g Query based on Stock Table (and others), Form Based on Query, Embeded
form based on Form.

Thanks Ray C
 
G

Guest

They shure do, just when you yhink you have all the bases covered something
else pops up and you have to virtually re-write everything.
I think I have resolved the problem, not bu using your suggestion but
something very close. I just have to write the code and re write some of the
existing code. (probablu breakibg some other part in the proccess). Ah well,
such fun!!

Thanks and regards RayC

Hunter57 said:
Hi Ray,

"I guess that the answer is to re-think the way I am diong this . . ."

Databases have a way of doing that to us, don't they?

I am not sure this would help but you could make the Stock Form the main
form and the Customer Form the Subform. Link them together using the Hire
Contract Number field. Use your FindSerialNo Combo Box to open the Stock
Form to the record you need and the Customer subform should display all
customer records that have the corresponding Hire Contract Number.

Does that help?

Hunter57








Ray C said:
Whilst I do have a Hire Contract Number that links the CustomerTable and the
Stock Table, I don't have that available in the scenario I am trying to
achieve.
I guess that the answer is to re-think the way I am diong this but what I am
trying to acheive is to open the Main Form (that is based on the Customer
Table), hide all the Customer info (all Text Boxes ".Visible = False"), open
up an Unbound Box called FindSerialNo and allow the user to search the Stock
Table for a piece of equipment, If the equipment is found, the Main Form will
display all of the information related to the customer who is currently
hiring it allong with all the other items of Stock that are booked out to
that same customer (that bit is aready written and works from a ContreactNo
eneuiry). If not, I would go on to create a new record in the Stock Table.
As I said, I probably need to rethink how I do this.
Thank you so much for your kind help. Regards RayC



Hunter57 said:
Hi Ray,

Whan a customer buys a stock, how do you know stock the customer bought?
Surely there is some field in common linking the two tables. unless you are
using another table to which both the Customer and the Stock Table relate.

When you open the relationship window do you see a line connecting the two
tables? If so, then your tables have a field in common.

Or do you see another table to which both the Customer Table and Stock Table
are related?

Do you have a StockID or StockName field in your Customer Table? Or do you
have a CustomerID or CustomerName field in your Stock table?

If not, Here is how you can link the forms. Open your Customer Table in
Design view and add a new field with the same name as the Primary Key Field
in the Stock Table (StockID or whatever it is named). [Note: you could do
it the other way and add a CustomerID field to the Stock Table.]

You will then need to fill the StockID field in the Customer's Table with
the appropriate data from the Stock Table.

Next, open the relationships window and drag the StockID field from the
Stock Table to the StockID field in the Customers Table.

After that you can then link the subform to the main form using the
instructions I gave you earlier.

Wish you the best
Hunter57

:

Thanks for the reply. First my apologies, I forgot to say that he "SubForm"
is on a tab. I feel prety sure that this is not the problem as I set up for
the program to Make Visible and Set Focus all of the Tabs in turn and they
all display correctly. When I get to the Tab with the embeded subForm, all
that displays is the border and a blank area.
I can not use your Master and Child method of linking because the Sub form
and the Mater Form do not have the same Fields To link. My Master Form is
Based on the Customers Table and my Sub Form is based on the Stock Table. I
have an Unbound Text Box in the Main Form that is called "FindSerialNo". In
the Criteria of the Query I have "[Forms]![frm_MainForm]![findSerialNo]".
When I enter a valid Serial No in the FindSerialNo Text Box, the Query (that
is Based on the Stock table) finds and displays the correct record, the
QueryForm 9that is based on the Query)finds and displays the correct record
bur the SubForm (that is based on the QueryForm remains blank.
Thanks RayC


:

Hi Ray,

By embedded form I take it you are speaking of a subform. In order for a
subform and a master form (the form containing the subform) to be syncronized
they must be linked.

If they are not linked you can do it by opening the master form in Design
View. Next, right click on the border or edge of the subform. When the menu
appears select Properties. Click on the Data Tab.

You should see

Source Object YourSubFormName
Link Child Fields
Link Master Fields

If there is nothing beside the Link Child Fields and the Link Master Fields,
then you need to create the link.

To do this, right click to the far right of Link Child Fields. In the menu
that appears Select Build. A dialogue box should open that will help you
select a common field to link both forms. You can even let Access suggest
the fields for you.

The link fields need to be the same field for both forms.

If that is not the problem, then someone with more expertise that I needs to
help you.

Regards,
Hunter57
http://churchmanagementsoftware.googlepages.com

:

I have a "Stock" form that is based on a Query of the Stock Table and a
couple of other Tables. I have embeded that form in another form that is
based on a Cusomer Table and linked the query to an Unbound text box. When I
put a stock item into the Text Box, I think that it should displat the record
in the embeded form. However, even though the Query and the Form display the
correct record info if I open them, The Embeded form stays blank, What am I
doing wrong, can anyone help please?
e.g Query based on Stock Table (and others), Form Based on Query, Embeded
form based on Form.

Thanks Ray C
 

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