S
Supe
I copied over a form that someone else had created for a different database
for a different vendor. When I try and run the form I get a Data Type
Mismatch In Criteria Type error. I noticed that the UPCCase field's Date
Type is a Text on the Master Table in the original database and it is Numeric
in the Master Table on the database I copied it to. I tried changing the
data type to Text in the table, but I get a "There isn't enough disc space or
memory" error.
I don't have much coding experience, but know that numeric and text has to
have certain quotes around them. I tried figuting out myself with no luck.
The code below is what the debug brings me too. Can someone look at this and
let me know what need to be change for this numeric UPCCase field to work.
DoCmd.RunSQL "INSERT INTO [VOID - Concantenated Master List] ( CustNbr,
Store, City, State, UPCCase, Expr1, SVItemCd, SVDescription, [Beg Date], [End
Date] ) SELECT DISTINCT [Heinz Master].CustNbr, [All in one store
reference].Store, [Heinz Master].City, [Heinz Master].State, [Heinz
Master].UPCCase, [CustNbr] & [UPCCase] AS Expr1, [Heinz Master].SVItemCd,
[Heinz Master].SVDescription, [Week Numbers].[Beg Date], [Week Numbers].[End
Date] " & _
"FROM ([All in one store reference] LEFT JOIN [Heinz Master] ON [All
in one store reference].[Store Num] = [Heinz Master].CustNbr) LEFT JOIN [Week
Numbers] ON [Heinz Master].[Invoice Week] = [Week Numbers].[Wk#] WHERE
([Heinz Master].UPCCase IN (" & strUPCs & ")) AND ([Heinz Master].[Invoice
Week] >= '" & begn & "' And [Heinz Master].[Invoice Week] <= '" & endn & "')
GROUP BY [Heinz Master].CustNbr, [All in one store reference].Store, [Heinz
Master].City, [Heinz Master].State, [Heinz Master].UPCCase, [CustNbr] &
[UPCCase], [Heinz Master].SVItemCd, [Heinz Master].SVDescription, [Week
Numbers].[Beg Date], [Week Numbers].[End Date];"
for a different vendor. When I try and run the form I get a Data Type
Mismatch In Criteria Type error. I noticed that the UPCCase field's Date
Type is a Text on the Master Table in the original database and it is Numeric
in the Master Table on the database I copied it to. I tried changing the
data type to Text in the table, but I get a "There isn't enough disc space or
memory" error.
I don't have much coding experience, but know that numeric and text has to
have certain quotes around them. I tried figuting out myself with no luck.
The code below is what the debug brings me too. Can someone look at this and
let me know what need to be change for this numeric UPCCase field to work.
DoCmd.RunSQL "INSERT INTO [VOID - Concantenated Master List] ( CustNbr,
Store, City, State, UPCCase, Expr1, SVItemCd, SVDescription, [Beg Date], [End
Date] ) SELECT DISTINCT [Heinz Master].CustNbr, [All in one store
reference].Store, [Heinz Master].City, [Heinz Master].State, [Heinz
Master].UPCCase, [CustNbr] & [UPCCase] AS Expr1, [Heinz Master].SVItemCd,
[Heinz Master].SVDescription, [Week Numbers].[Beg Date], [Week Numbers].[End
Date] " & _
"FROM ([All in one store reference] LEFT JOIN [Heinz Master] ON [All
in one store reference].[Store Num] = [Heinz Master].CustNbr) LEFT JOIN [Week
Numbers] ON [Heinz Master].[Invoice Week] = [Week Numbers].[Wk#] WHERE
([Heinz Master].UPCCase IN (" & strUPCs & ")) AND ([Heinz Master].[Invoice
Week] >= '" & begn & "' And [Heinz Master].[Invoice Week] <= '" & endn & "')
GROUP BY [Heinz Master].CustNbr, [All in one store reference].Store, [Heinz
Master].City, [Heinz Master].State, [Heinz Master].UPCCase, [CustNbr] &
[UPCCase], [Heinz Master].SVItemCd, [Heinz Master].SVDescription, [Week
Numbers].[Beg Date], [Week Numbers].[End Date];"