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