Data type Mismatch

D

dplove

The following is the SQL for a Query that I'm trying to do and it will not
work for nothing. I can't figure out what is wrong. Each of my records has
a subcategory.

Please help:

SELECT [Patterns List].PatternName, [Patterns List].PatternNumber, [Patterns
List].Subcategories, [Patterns List].TypeofGarment, [Patterns
List].[Letter/NumberofGarment], [Patterns List].SuggestedFabrics, [Patterns
List].Notions, [Patterns List].[YdsofFabricin45"], [Patterns
List].[YdsofFabricin54"], [Patterns List].[YdsofFabricin60"], [Patterns
List].Lining, [Patterns List].Lining, [Patterns List].[YdsofLinining in 45"],
[Patterns List].[Additional Fabric]
FROM [Patterns List]
WHERE ((([Patterns List].Subcategories)="Pants"));
 
K

KARL DEWEY

it will not work for nothing.
What does this mean?
Does it display not records? What is results if you remove the criteria?
Does it display too many records?
Is your [Subcategories] field a lookup field? If so, then that might be the
problem.

BTW you have [Patterns List].Lining twice.
 
M

Marshall Barton

dplove said:
The following is the SQL for a Query that I'm trying to do and it will not
work for nothing. I can't figure out what is wrong. Each of my records has
a subcategory.

SELECT [Patterns List].PatternName, [Patterns List].PatternNumber, [Patterns
List].Subcategories, [Patterns List].TypeofGarment, [Patterns
List].[Letter/NumberofGarment], [Patterns List].SuggestedFabrics, [Patterns
List].Notions, [Patterns List].[YdsofFabricin45"], [Patterns
List].[YdsofFabricin54"], [Patterns List].[YdsofFabricin60"], [Patterns
List].Lining, [Patterns List].Lining, [Patterns List].[YdsofLinining in 45"],
[Patterns List].[Additional Fabric]
FROM [Patterns List]
WHERE ((([Patterns List].Subcategories)="Pants"));


"it will not work for nothing" tells me nothing. What did
it do?

If it generates a data type mismatch error, then I suspect
that [Patterns List].Subcategories is a number type field.
 
D

dplove

It does not display any records but if I remove the criteria it will display
all records.

It is a lookup field...so does that mean I can't use a criteria in this
field? I have also tried to use a criteria in the "typeofgarment" field
(which is also a lookup field) and no records will display with same error
message.

It after reading what I writing it seems that the problem is because they
are lookup fields....is there a way to get around this?

Thanks...I did notice I had lining in there twice and removed one.

KARL DEWEY said:
What does this mean?
Does it display not records? What is results if you remove the criteria?
Does it display too many records?
Is your [Subcategories] field a lookup field? If so, then that might be the
problem.

BTW you have [Patterns List].Lining twice.

--
Build a little, test a little.


dplove said:
The following is the SQL for a Query that I'm trying to do and it will not
work for nothing. I can't figure out what is wrong. Each of my records has
a subcategory.

Please help:

SELECT [Patterns List].PatternName, [Patterns List].PatternNumber, [Patterns
List].Subcategories, [Patterns List].TypeofGarment, [Patterns
List].[Letter/NumberofGarment], [Patterns List].SuggestedFabrics, [Patterns
List].Notions, [Patterns List].[YdsofFabricin45"], [Patterns
List].[YdsofFabricin54"], [Patterns List].[YdsofFabricin60"], [Patterns
List].Lining, [Patterns List].Lining, [Patterns List].[YdsofLinining in 45"],
[Patterns List].[Additional Fabric]
FROM [Patterns List]
WHERE ((([Patterns List].Subcategories)="Pants"));
 
K

KARL DEWEY

Lookup fields stores one thing and displays another so if the criteria
matches the display then it will not work.
Criteria has to match what is stored.

--
Build a little, test a little.


dplove said:
It does not display any records but if I remove the criteria it will display
all records.

It is a lookup field...so does that mean I can't use a criteria in this
field? I have also tried to use a criteria in the "typeofgarment" field
(which is also a lookup field) and no records will display with same error
message.

It after reading what I writing it seems that the problem is because they
are lookup fields....is there a way to get around this?

Thanks...I did notice I had lining in there twice and removed one.

KARL DEWEY said:
it will not work for nothing.
What does this mean?
Does it display not records? What is results if you remove the criteria?
Does it display too many records?
Is your [Subcategories] field a lookup field? If so, then that might be the
problem.

BTW you have [Patterns List].Lining twice.

--
Build a little, test a little.


dplove said:
The following is the SQL for a Query that I'm trying to do and it will not
work for nothing. I can't figure out what is wrong. Each of my records has
a subcategory.

Please help:

SELECT [Patterns List].PatternName, [Patterns List].PatternNumber, [Patterns
List].Subcategories, [Patterns List].TypeofGarment, [Patterns
List].[Letter/NumberofGarment], [Patterns List].SuggestedFabrics, [Patterns
List].Notions, [Patterns List].[YdsofFabricin45"], [Patterns
List].[YdsofFabricin54"], [Patterns List].[YdsofFabricin60"], [Patterns
List].Lining, [Patterns List].Lining, [Patterns List].[YdsofLinining in 45"],
[Patterns List].[Additional Fabric]
FROM [Patterns List]
WHERE ((([Patterns List].Subcategories)="Pants"));
 
D

dplove

Thanks for the info...I didn't know that...I just have to figure something
else out.

KARL DEWEY said:
Lookup fields stores one thing and displays another so if the criteria
matches the display then it will not work.
Criteria has to match what is stored.

--
Build a little, test a little.


dplove said:
It does not display any records but if I remove the criteria it will display
all records.

It is a lookup field...so does that mean I can't use a criteria in this
field? I have also tried to use a criteria in the "typeofgarment" field
(which is also a lookup field) and no records will display with same error
message.

It after reading what I writing it seems that the problem is because they
are lookup fields....is there a way to get around this?

Thanks...I did notice I had lining in there twice and removed one.

KARL DEWEY said:
it will not work for nothing.
What does this mean?
Does it display not records? What is results if you remove the criteria?
Does it display too many records?
Is your [Subcategories] field a lookup field? If so, then that might be the
problem.

BTW you have [Patterns List].Lining twice.

--
Build a little, test a little.


:

The following is the SQL for a Query that I'm trying to do and it will not
work for nothing. I can't figure out what is wrong. Each of my records has
a subcategory.

Please help:

SELECT [Patterns List].PatternName, [Patterns List].PatternNumber, [Patterns
List].Subcategories, [Patterns List].TypeofGarment, [Patterns
List].[Letter/NumberofGarment], [Patterns List].SuggestedFabrics, [Patterns
List].Notions, [Patterns List].[YdsofFabricin45"], [Patterns
List].[YdsofFabricin54"], [Patterns List].[YdsofFabricin60"], [Patterns
List].Lining, [Patterns List].Lining, [Patterns List].[YdsofLinining in 45"],
[Patterns List].[Additional Fabric]
FROM [Patterns List]
WHERE ((([Patterns List].Subcategories)="Pants"));
 

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