Can this be done...

M

Michelle

I am going nuts....
I have 3 tables the first two are combined with the following sql
code....the 3rd is basicly for a comment field that I to relate to the entier
query not just one record in the query. I have a form that uses the first
query then a command buttont that opens the "comment" form for the user to
enter comments about the entire form. I am not sure how to relate that or to
get it to show up on my reprot when it prints.

Code for 1st query...
SELECT inmtinfo.IN_CELLDRM, inmtinfo.IN_INMNUM, inmtinfo.IN_NAME,
inmtinfo.IN_BLDING, inmtinfo.IN_SECTION, tblInspection.DATE,
tblInspection.TIME, tblInspection.BARS, tblInspection.W_S,
tblInspection.A_VENTS, tblInspection.W_C_F, tblInspection.PF_C,
tblInspection.EF_C, tblInspection.CF, tblInspection.D_F_W_L,
tblInspection.B_M_F, tblInspection.STAFF
FROM inmtinfo LEFT JOIN tblInspection ON
inmtinfo.IN_INMNUM=tblInspection.IN_INMNUM
WHERE (((inmtinfo.IN_BLDING)="H") AND ((inmtinfo.IN_SECTION)=[ENTER POD]));

The comment table is
COMMID - autonum - primay key
Comment - memo
 
S

stebain

Michelle said:
I am going nuts....
I have 3 tables the first two are combined with the following sql
code....the 3rd is basicly for a comment field that I to relate to the
entier
query not just one record in the query. I have a form that uses the first
query then a command buttont that opens the "comment" form for the user
to
enter comments about the entire form. I am not sure how to relate that or
to
get it to show up on my reprot when it prints.

Code for 1st query...
SELECT inmtinfo.IN_CELLDRM, inmtinfo.IN_INMNUM, inmtinfo.IN_NAME,
inmtinfo.IN_BLDING, inmtinfo.IN_SECTION, tblInspection.DATE,
tblInspection.TIME, tblInspection.BARS, tblInspection.W_S,
tblInspection.A_VENTS, tblInspection.W_C_F, tblInspection.PF_C,
tblInspection.EF_C, tblInspection.CF, tblInspection.D_F_W_L,
tblInspection.B_M_F, tblInspection.STAFF
FROM inmtinfo LEFT JOIN tblInspection ON
inmtinfo.IN_INMNUM=tblInspection.IN_INMNUM
WHERE (((inmtinfo.IN_BLDING)="H") AND ((inmtinfo.IN_SECTION)=[ENTER
POD]));

The comment table is
COMMID - autonum - primay key
Comment - memo

Have you tried having the comment as part of a subform?
 
M

Michelle

yes I have, as a subform, subreport, etc. It wants to relate to each entry
not the entire thing. I did change and try to have it relate to the date in
the tblInspection because the data is transfered to an old table each day
this should work but does not.

stebain said:
Michelle said:
I am going nuts....
I have 3 tables the first two are combined with the following sql
code....the 3rd is basicly for a comment field that I to relate to the
entier
query not just one record in the query. I have a form that uses the first
query then a command buttont that opens the "comment" form for the user
to
enter comments about the entire form. I am not sure how to relate that or
to
get it to show up on my reprot when it prints.

Code for 1st query...
SELECT inmtinfo.IN_CELLDRM, inmtinfo.IN_INMNUM, inmtinfo.IN_NAME,
inmtinfo.IN_BLDING, inmtinfo.IN_SECTION, tblInspection.DATE,
tblInspection.TIME, tblInspection.BARS, tblInspection.W_S,
tblInspection.A_VENTS, tblInspection.W_C_F, tblInspection.PF_C,
tblInspection.EF_C, tblInspection.CF, tblInspection.D_F_W_L,
tblInspection.B_M_F, tblInspection.STAFF
FROM inmtinfo LEFT JOIN tblInspection ON
inmtinfo.IN_INMNUM=tblInspection.IN_INMNUM
WHERE (((inmtinfo.IN_BLDING)="H") AND ((inmtinfo.IN_SECTION)=[ENTER
POD]));

The comment table is
COMMID - autonum - primay key
Comment - memo

Have you tried having the comment as part of a subform?
 
S

stebain

Use this as your template:

Create a table named "Table1"
Create a memo field in Table1 named "Comment"

Create a form named "Form_Table1". (I used the form wizard, since it is
just a demo)
Go to the form properties and set the following properties to "No":
Allow PivotTable view, Allow PivotChart View, Record Selectors, Navigation
Buttons, Dividing Lines.
Make sure the Default View is "Single Form".

Create a table named "Table2"
Create two fields "rec1" and "rec2" in Table2.
Create a form named "Form_Table2" using the form wizard.

Now, open Form_Table2 in design mode.

Make room to add a subform.

Use drag and drop to drag Form_Table1 into the detail area of Form_Table2.

When I created this, it gave me a subform that was not linked to a specific
record and had no tying / joining fields.
I could enter as many records into Table2 without any change to Table1.
 
M

Michelle

that worked for the form, but now how would I get the comment to print on the
report if there in no link?
 
S

stebain

If the comment will always be the same, try to use a subreport and no
linkage (similar to what is happening for the form).
[I haven't tested that]
 

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