Re: query error



Thanks... the SQL is: SELECT Clients.First, Clients.Last, Company.Company,
Company.DatePosted, Company.SiteCost
FROM Clients INNER JOIN Company ON Clients.[ClientID] = Company.[Company];

This is one that worked: SELECT Clients.Last, Clients.Company
FROM Clients;

Also, something strange happened that eventually cleared itself. When I
went into the Company table the 'last' and 'company' names had changed to the
clientID from the Client table. After shutting down Access, the names
reappeared??


"Douglas J. Steele" wrote:

As John suggested, posting the SQL of your query that's raising the error
will help us help you.

If you're not familiar with SQL, open the query in Design view, then select
View | SQL View from the menu. You'll see the actual SQL that Access has
generated for your query. Copy that, and paste it into your reply.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"compsum" <compsum@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:7ADAE082-CD7D-4E3F-BB27-4F9979374922@xxxxxxxxxxxxxxxx
Thanks John... this is my first use of Access.. Two tables one is called
Clients and has 13 fields... the first is ClientID (autonumber -primary)
and
the rest are text (first, last, spouse, company,
Emailaddress,homephone,address, address2,city,state,zip,cellphone
The other table is called compay and has 17 fields... they are
last,company
(primary),cophone,cofax,coaddress1,coaddress2,city,state,zip,host,hostaccount,hostpassword,secret,comments
(all are text),dateposted(date/time),nopages(number),sitecost(currency)
The
relationship is between ClientID in Client and customer in company.
Also, when I click on the plus sign in front of any record in either table
I
get an error message (An expression is typed incorrectly or is too complex
to
be evaluated....)


"John W. Vinson" wrote:

On Sun, 15 Apr 2007 20:22:00 -0700, compsum
<compsum@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

I saved the database in Acess 2003 format... same problem when running
Access
2003 in Vista. I have a dual boot system with XP... ran the database in
Access 2003... same error. When I clicked on the Query to open it I got
a
'Type Mismatch in expression error'.

Then there's a problem with the query.

Care to post the SQL so someone might have a chance to see what the
problem
might be? Indicate the datatype of each field in the JOIN clause (hint:
they
should match, the error indicates that they don't).

John W. Vinson [MVP]




.



Relevant Pages

  • Re: Help With Multiple Tables, Fields and query -
    ... Create a query that selects the data and shows the fields you want to update as ... Switch to SQL view ... Desire to dump the ~ *and* to separate the first and last names INTO ... FirstName, LastName, Organization Add ClientID and the ...
    (microsoft.public.access.gettingstarted)
  • Re: Help With Multiple Tables, Fields and query -
    ... Create a query that selects the data and shows the fields you want to update as ... Switch to SQL view ... Desire to dump the ~ *and* to separate the first and last names INTO ... FirstName, LastName, Organization Add ClientID and the ...
    (microsoft.public.access.gettingstarted)
  • Re: Import and append a column from excel to an existing db
    ... John W. Vinson writes ... OK Here's the SQL for the update version of the query, ...
    (microsoft.public.access.gettingstarted)
  • Re: nasty SQL query, please advise...
    ... I don't think I can do this in a single query. ... My guess is that the following is correct SQL: ... check that the clientid is not null. ... I don't have an SQL reference book; if I need one I look up the T-SQL ...
    (comp.lang.pascal.delphi.misc)
  • Re: Populate a field by query
    ... "John W. Vinson" wrote: ... Set the Unique Values property of the query to Yes. ... SQL view of the query, indicate what it's showing, and what you want it to ...
    (microsoft.public.access.queries)