Simple Concatonate question

G

Guest

To Simplify for the reader, I will put quotes around "table" names and
asterisks around *field* names:

I have two tables in a select query. One is called "parts" the other is
called "purchaseorders". I used the *Part number* field from the "parts"
table and took the *purchase order number* from the "purchaseorders" table.
I then concatonated the two fields in a select query by typing the following
in the design grid: Part & PurchaseOrder: [parts.PART] &
[purchaseorders.PO]. That seemed to work fine. Following is the part I am
really unsure of myself on. I made a new select query and inserted the
previous select query (which is of course a table) I had just made (which had
my concatonated number), and made a relationship between the concatonated
*Part number&Purchase Order number* field to a *part number* and *purchase
order* (one field in the old table, two fields in the new table) field in a
third table called "purchase order details" (I did this so I could get the
quantities and prices that only the "purchase order details" table
contained). I wanted to know which purchase orders the part numbers belonged
to, so I made the relationship from my original concatonated field to BOTH
the *purchase order number* and the *part number* fields in the third table,
"purchase order details". When I ran the query, a dialog box asked me to
define my parameters. I don't know what the computer wants me to do. This
is where I am stuck. Any help in the right direction would be appreciated.


Thank you,

Zack Andersen
 
D

Duane Hookom

I would never use spaces and symbols in any field or column name. I would
get rid of these especially the "&" which is a concatenation character and
has other meanings in Access. Also, your bracketing is wrong in:
Part & PurchaseOrder: [parts.PART] & [purchaseorders.PO]

I would recommend:
Part_PurchaseOrder: [parts].[PART] & [purchaseorders].[PO]

In the future, you might want to try to divide your message into paragraphs.
I have a tendency to bypass any posting that is a single long paragraph
because my old brain has trouble digesting the information.

Compare the above to this unstructured reply:
I would never use spaces and symbols in any field or column name. I would
get rid of these especially the "&" which is a concatenation character and
has other meanings in Access. Also, your bracketing is wrong in: Part &
PurchaseOrder: [parts.PART] & [purchaseorders.PO] I would recommend:
Part_PurchaseOrder: [parts].[PART] & [purchaseorders].[PO] In the future,
you might want to try to divide your message into paragraphs. I have a
tendency to bypass any posting that is a single long paragraph because my
old brain has trouble digesting the information.

--
Duane Hookom
MS Access MVP
--

The parawon said:
To Simplify for the reader, I will put quotes around "table" names and
asterisks around *field* names:

I have two tables in a select query. One is called "parts" the other is
called "purchaseorders". I used the *Part number* field from the "parts"
table and took the *purchase order number* from the "purchaseorders"
table.
I then concatonated the two fields in a select query by typing the
following
in the design grid: Part & PurchaseOrder: [parts.PART] &
[purchaseorders.PO]. That seemed to work fine. Following is the part I
am
really unsure of myself on. I made a new select query and inserted the
previous select query (which is of course a table) I had just made (which
had
my concatonated number), and made a relationship between the concatonated
*Part number&Purchase Order number* field to a *part number* and *purchase
order* (one field in the old table, two fields in the new table) field in
a
third table called "purchase order details" (I did this so I could get the
quantities and prices that only the "purchase order details" table
contained). I wanted to know which purchase orders the part numbers
belonged
to, so I made the relationship from my original concatonated field to BOTH
the *purchase order number* and the *part number* fields in the third
table,
"purchase order details". When I ran the query, a dialog box asked me to
define my parameters. I don't know what the computer wants me to do.
This
is where I am stuck. Any help in the right direction would be
appreciated.


Thank you,

Zack Andersen
 

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

Similar Threads


Top