Union Query Problem

M

Michelle

I the the following code...
SELECT
inmtinfo.IN_INMNUM,
inmtinfo.IN_NAME,
inmtinfo.IN_BLDING,
inmtinfo.IN_SECTION,
inmtinfo.IN_CELLDRM,
tblESSLog.SEP,
tblESSLog.EXERCISE,
tblESSLog.SHOWER,
tblESSLog.[YARD #],
tblESSLog.RAZOR,
tblESSLog.SCREAM,
tblESSLog.MIRROR,
tblESSLog.DATE
FROM inmtinfo LEFT JOIN tblESSLog ON inmtinfo.IN_INMNUM=tblESSLog.IN_INMNUM
WHERE (((inmtinfo.IN_BLDING)="H") And ((inmtinfo.IN_SECTION)=[ENTER POD]));

Problem is when I use this query in a form so that I can enter data into the
tblESSLog it just dings at me when I try to type any thing in.
 
M

MGFoster

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The query has to be updateable, which means all required columns and
primary keys/unique columns from both tables have to be in the SELECT
clause.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBRI73LoechKqOuFEgEQJzAwCeOSB8TPvLtZkLc1tjSPck4d725hwAn0Ao
JZuzKvhL33nVKbBd5NWXYUZM
=9KgQ
-----END PGP SIGNATURE-----
 
M

Michelle

So if table inmtinfo has 40 columns and table tblESSLog has 7 I will need to
add all in the select statement...I just want to make sure before I do all of
this coding.

MGFoster said:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The query has to be updateable, which means all required columns and
primary keys/unique columns from both tables have to be in the SELECT
clause.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBRI73LoechKqOuFEgEQJzAwCeOSB8TPvLtZkLc1tjSPck4d725hwAn0Ao
JZuzKvhL33nVKbBd5NWXYUZM
=9KgQ
-----END PGP SIGNATURE-----

I the the following code...
SELECT
inmtinfo.IN_INMNUM,
inmtinfo.IN_NAME,
inmtinfo.IN_BLDING,
inmtinfo.IN_SECTION,
inmtinfo.IN_CELLDRM,
tblESSLog.SEP,
tblESSLog.EXERCISE,
tblESSLog.SHOWER,
tblESSLog.[YARD #],
tblESSLog.RAZOR,
tblESSLog.SCREAM,
tblESSLog.MIRROR,
tblESSLog.DATE
FROM inmtinfo LEFT JOIN tblESSLog ON inmtinfo.IN_INMNUM=tblESSLog.IN_INMNUM
WHERE (((inmtinfo.IN_BLDING)="H") And ((inmtinfo.IN_SECTION)=[ENTER POD]));

Problem is when I use this query in a form so that I can enter data into the
tblESSLog it just dings at me when I try to type any thing in.
 
J

John Vinson

Problem is when I use this query in a form so that I can enter data into the
tblESSLog it just dings at me when I try to type any thing in.

If tinmtinfo is a UNION query (as your Subject line suggests), you
won't be able to update it or any query including it.

You may need to use a Subform, or DLookUps, or some other way to get
the data displayed.

John W. Vinson[MVP]
 
M

Michelle

I figured out my problem I had the inmtinfo file was a link so I changed it
to an import and now it works fine.
 

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

Left Join 2
Union Query Issue 1
Error "The search key was not found in any record" 1
Join Issues (can not enter data) 1
Delete Query Problem 1
Combine 3 tables 0
Union issue 1
Compiler Error....Syntax Error.... 1

Top