Subform Problems

G

Guest

Good day,

I have a table with the field OrderID that is a primary key linked to other
tables with one to many relationships.

I generate a query based on these subforms and it does not display the
information unless I go through each subfrom and press enter which makes a
record. Basically I donot want to have the user to do this all the time if
they feel like skippping a subform. Any Idea on how to take care of this so
my query works regardless. I have set all me defaults to Zero on the subforms
hoping this would do the trick however it doesnt.

Hope this makes sense, any help would be appreciated.

Thanks in advance
 
J

J. Goddard

Don't you mean "sub-forms based on a query"?
Have you set the Link Child Fields and Link Master Fields for each of
the sub-forms on the main form?

what do you mean by "going through" each suform, and how does a user
"skip" one?

John
 
G

Guest

Hi, Thanks for taking the time to try and help me out.

Okay I have a main table and other tabels that link to the main table with a
one to many relationship.

each table that links to the main table is a subform. I have 3 in the main
form. My tables are:
Main - **Main table
Press - ** Subform
PrePress-** Subform
Shipping-** Subform

My Query takes the information and sums the totals for each record. This is
so I can generate a report based on the information entered. The user can
skip a subform for example Press if the operation is not required. The query
does not display the records unless each subform has information. If I go
through each subform and press the enter key which inturn creates a record in
the subform and then displays in the query which inturn produces the
information in my report. It is like the PressID (Number) which is linked to
the Main table -MainID(AutoNumber)(Primary Key) linked by a one to many
relationship. MasterField is MainID and the ChildField is PressID. The
pressID does not produce the AutoNumber in it unless I hit enter which
creates a record in the Press ID.

Hope this makes sense

Hope this makes sense.
 
G

Guest

For Example: Try This.

Create a Table Called MAIN
Fields/Structure are:
MainID - AutoNumber (Set as Primary Key)
Date - Date/Time
Sales Name - Text

Create another Table Called PressID
Fields /Structure are:

PressID - Number
Description - Text
TotalCost - Currency

Create a relationship between the two MainID to PressID one to many checking
off all three boxes.

Then create a form with the maintable information and the Press table
information as the subform through the wizard.
Only fill in the MainTable information in the form. You will see the PressID
return 1 which is correct (Same as main table)

Generate a query based on this infomation and you will see that nothing
shows up unless you press enter in the PressSubform creating a record. or put
in information.
 

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