From: S.E. on 21 May 2010 16:35 I get a "type mismatch in expression" when saving a query. Why do I get this and how do I correct this? My suspicion is my customerID and barcode fields are not both autonumbers or the same type to relate but under the relationships they join up. Please help.
From: Marshall Barton on 21 May 2010 17:55 S.E. wrote: >I get a "type mismatch in expression" when saving a query. Why do I get this >and how do I correct this? My suspicion is my customerID and barcode fields >are not both autonumbers or the same type to relate but under the >relationships they join up. What are the types of the fields in the table and what does the query's SQL view look like? If one is Text and the other is a number type, then use a convesion function (CStr, CLng or ??). -- Marsh MVP [MS Access]
From: John W. Vinson on 21 May 2010 22:33 On Fri, 21 May 2010 13:35:01 -0700, S.E. <S.E.(a)discussions.microsoft.com> wrote: >I get a "type mismatch in expression" when saving a query. Why do I get this >and how do I correct this? My suspicion is my customerID and barcode fields >are not both autonumbers or the same type to relate but under the >relationships they join up. Please help. My guess is that you're another victim of the misleading "Lookup Wizard" field type. A barcode would normally be a Text field, and I'm guessing that the CustomerID is an Autonumber (a long integer). Posting the SQL of the query and your fields' datatypes would help. -- John W. Vinson [MVP]
From: S.E. on 22 May 2010 09:01 "Marshall Barton" wrote: > S.E. wrote: > > >I get a "type mismatch in expression" when saving a query. Why do I get this > >and how do I correct this? My suspicion is my customerID and barcode fields > >are not both autonumbers or the same type to relate but under the > >relationships they join up. > > What are the types of the fields in the table and what does > the query's SQL view look like? > > If one is Text and the other is a number type, then use a > convesion function (CStr, CLng or ??). > > -- > Marsh > MVP [MS Access] > . > Thanks for a response. One is a autonumber that is a long integer. The other is a text which I input using a barcode scanner. The barcode happens to be setup to input the customer's ID which corresponds to the customer ID in the other table. I'm not sure what you mean by SQL view b/c I have limited knowledge on this aspect. BTW, the tables are not joined in any way through the relationship if that matters. How do you setup a conversion function?
From: S.E. on 22 May 2010 09:05 "John W. Vinson" wrote: > On Fri, 21 May 2010 13:35:01 -0700, S.E. <S.E.(a)discussions.microsoft.com> > wrote: > > >I get a "type mismatch in expression" when saving a query. Why do I get this > >and how do I correct this? My suspicion is my customerID and barcode fields > >are not both autonumbers or the same type to relate but under the > >relationships they join up. Please help. > > My guess is that you're another victim of the misleading "Lookup Wizard" field > type. A barcode would normally be a Text field, and I'm guessing that the > CustomerID is an Autonumber (a long integer). > > Posting the SQL of the query and your fields' datatypes would help. > -- > > John W. Vinson [MVP] > . > Thanks for a response. Correct on all accounts. One is a autonumber that is a long integer. The other is a text which I input using a barcode scanner. The barcode happens to be setup to input the customer's ID which corresponds to the customer ID in the other table. I'm not sure about the SQL's b/c I have limited knowledge on this aspect. BTW, the tables are not joined in any way through the relationship if that matters. Can you walk me through posting the SQL you referred to above?
|
Next
|
Last
Pages: 1 2 Prev: Need help with concatenation function Next: Query Setup with Two Tables |