specifying data type in parameter queries?

H

Howard

I have a query combining several tables. One field asks for the year
when a student was in year 11 like this...

Y11Year : [when did they start year 11?]

this query is then used in two further cascaded queries, then finally a
report that uses the Y11Year field. All works fine.

To speed things up I changed the final query to a 'make table' one so
that I only had to run it once rather than each time I ran the report.

However I now get a type mismatch error on that field and null entries
in the table. I also note that the data type for Y11year in the created
table is set to binary.

How do I force the data type to text and avoid this error?
Howard
 
M

MGFoster

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

In the Design view you can select Query > Parameters and enter the
phrase [when did they start year 11?] as the parameter.

In the Query's SQL view it will look like this:

PARAMETERS [when did they start year 11?] Text;
SELECT ... etc.

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
** Respond only to this newsgroup. I DO NOT respond to emails **

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

iQA/AwUBR7jTPIechKqOuFEgEQL9AwCgsBbOcbMiJnJLe6GJLT5LTYFjOpEAn2m1
nkFqSfP9orqcqAMNrRTyAf4+
=WbkG
-----END PGP SIGNATURE-----
 
H

Howard

Thanks that did it.

(I did try using parameters earlier but was putting the name of the
field there instead of the prompt I wanted, so I was getting asked twice
and it was still failing!) All fixed now

Howard
 

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