New to Access, need some help with a query

S

Soupguy

I need some help. I have basic Access experience and cant, for the life of me
figure out what im doing wrong.

Currently I have two tables:

Table 1 with Fields:
Category ID
Sub Cat ID
Product Term ID
Product Name
Description

Table 2 with Fields:
Field1
Field2
Field3
Field4
Field5
Field6
Field7

What I’ve been trying to do is create a query that will allow me to show a
datasheet with specific changes to data and only certain fields.

I need to see a datasheet like this:
Field2 (from Table 2)
Category ID (from Table 1)
Field4 (from Table 2)
Field5 (from Table 2)
Field6 (from Table 2)
Field1 (from Table 2)

Now here’s my problem:

In Table 1, the Product Term ID is dependant on the Category ID. As an
example, if the Product Term ID were 20-25, then the Category ID would be 1
or if the Product Term ID were 35-67 then the Category ID would be 2. There
are also multiples of the same numbers in the Product Term ID field.

In Table 2, the Field4 data in the column is the same data as in the Product
Term ID field from Table 1.

Basically what I need is to fill out the Category ID column with data
depending on what is in Field4 through the query while showing everything in
Table 2.

I’ve tried linking the fields Product Term ID and Field4 but I keep getting
errors in my data.

Can anyone help?
 
K

KARL DEWEY

What are the datatype of the Field4 and Product Term ID?
Post your query SQL. Open the query in design view, click on menu View -
SQL View, highlight all, copy, and paste in a post.
 

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