Union Query Problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
-----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-----
 
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.
 
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]
 
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.
 
Back
Top