Re: Query pulls data from wrong table field



I'm a bit confused at this stage as to just which fields in which tables
we're looking at. Perhaps you could you post the SQL? (I'm assuming that the
column isn't actually blank in the table?)

--
Brendan Reynolds
Access MVP


"CW" <CW@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:84A6F69B-EDE6-4719-8DE2-388294C1290A@xxxxxxxxxxxxxxxx
Aaaargh! Of course...I wasn't querying the correct table, where the
companyname actually lives.
However, having now brought in that table and field, with a one-to-many
join
("2") on companyname from Inquiries to Customers, it now doesn't give me
anything AT ALL in the name column. Complete set of blanks!
What now, please?
Many thanks
CW

"Brendan Reynolds" wrote:

It's probably a lookup field. Open the table in design view, select the
companyname field, and click the 'Lookup' tab in the Field Properties
pane
at the bottom of the table design view. Do you see a 'Row Source'
property?
If so, note the name of the table it is selecting from. You'll need to
join
that table into your query to include the real company name field.

--
Brendan Reynolds
Access MVP

"CW" <CW@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:9958CE57-A643-4C8D-B716-7ABF0514D3A1@xxxxxxxxxxxxxxxx
I have a Customers table that includes "companyname" and various other
details.
I have an Inquiries table and a form based upon it.
On that form I have a combo that looks up the company names and pulls
them
through correctly, no problem.
I have now built a Query that includes Customers/companyname, but
instead
of
pulling through the name it gives me the ID numbers of the companies,
not
their names.
I assume it is simply looking at the wrong column in the table.
I know how to manipulate bound columns in Forms, i.e. through the
properties
of the relevant control, but how do you tweak this in a Query?
(I have looked at the SQL view of the Query and it says it is selecting
companyname. But it is not!!)






.



Relevant Pages

  • Re: Query pulls data from wrong table field
    ... The CorpName does appear in the Inquiries table, ... I guess it is more of a table contents issue, rather than just my query, ... "Brendan Reynolds" wrote: ... on companyname from Inquiries to Customers, ...
    (microsoft.public.access.queries)
  • RE: two form based on the same parameter query
    ... fnCoName ... Since you cannot use global variables in a query, ... Static myCoName as string ... On both of the forms CompanyName is an unbound combobox. ...
    (microsoft.public.access.forms)
  • Re: sql union self-join syntax
    ... when I asked you why your query returned more names than ... I was able to tack it on the end of "Labels by Ken" to ... >> MemberName there is no CompanyName and no ContactName, ...
    (microsoft.public.access.queries)
  • Re: I should give up programming!
    ... " ORDER BY CompanyName" ... Because then I can print it to the immediate window and copy and paste it ... into a query for debugging. ... "FROM tblContacts;" ...
    (microsoft.public.access.modulesdaovba)
  • Re: I should give up programming!
    ... I have a lot of code where I'm basically using code to compare two tables in ... " ORDER BY CompanyName" ... into a query for debugging. ... "FROM tblContacts;" ...
    (microsoft.public.access.modulesdaovba)