A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Append queries with added information



 
 
Thread Tools Display Modes
  #1  
Old July 7th, 2009, 05:29 PM posted to microsoft.public.access.tablesdbdesign
Bob Waggoner[_2_]
external usenet poster
 
Posts: 80
Default Append queries with added information

I append the record of one table to another table and I want to add the same
text to one of the appended fields. "This comes from ConcernID #" and then
have the number inserted.

I can insert the number, I just haven't been able to get the text message to
go with it.

In the append to, I have written &"This comes from ConcernID #" & Comment
(Comment is the field I'm sending the concern id to).

I've tried to put it in the field name - that doesn't work.

I have access 2003.

Thanks for your help.
  #2  
Old July 7th, 2009, 07:01 PM posted to microsoft.public.access.tablesdbdesign
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Append queries with added information

You can not have a text message in a number field.
Post the SQL of what you tried and what is datatype of the fields.

"Bob Waggoner" wrote:

I append the record of one table to another table and I want to add the same
text to one of the appended fields. "This comes from ConcernID #" and then
have the number inserted.

I can insert the number, I just haven't been able to get the text message to
go with it.

In the append to, I have written &"This comes from ConcernID #" & Comment
(Comment is the field I'm sending the concern id to).

I've tried to put it in the field name - that doesn't work.

I have access 2003.

Thanks for your help.

  #3  
Old July 7th, 2009, 07:07 PM posted to microsoft.public.access.tablesdbdesign
Bob Waggoner[_2_]
external usenet poster
 
Posts: 80
Default Append queries with added information

I'm trying to send a number field to a memo field with the added text "This
is the concernID". Here's the SQL (without the text).

INSERT INTO 852Complaints ( MgmtRevID, [Customer Code], [Customer Name],
Complaint, [Date of Complaint], Comments, PSID, hyperlink2 )
SELECT [852ConcernTable].MgmtRevID, [852ConcernTable].[Customer Code],
[852ConcernTable].[Customer Name], [852ConcernTable].Complaint,
[852ConcernTable].[Date of Complaint], [852ConcernTable].ConcernID,
[852ConcernTable].PSID, [852ConcernTable].CustDocuments
FROM 852ConcernTable
WHERE
((([852ConcernTable].ConcernID)=[forms]![852Complaintsform]![852ConcernFORM]![ConcernID]));


"KARL DEWEY" wrote:

You can not have a text message in a number field.
Post the SQL of what you tried and what is datatype of the fields.

"Bob Waggoner" wrote:

I append the record of one table to another table and I want to add the same
text to one of the appended fields. "This comes from ConcernID #" and then
have the number inserted.

I can insert the number, I just haven't been able to get the text message to
go with it.

In the append to, I have written &"This comes from ConcernID #" & Comment
(Comment is the field I'm sending the concern id to).

I've tried to put it in the field name - that doesn't work.

I have access 2003.

Thanks for your help.

  #4  
Old July 7th, 2009, 07:07 PM posted to microsoft.public.access.tablesdbdesign
Piet Linden[_2_]
external usenet poster
 
Posts: 280
Default Append queries with added information

On Jul 7, 12:29*pm, Bob Waggoner
wrote:
I append the record of one table to another table and I want to add the same
text to one of the appended fields. "This comes from ConcernID #" and then
have the number inserted.

I can insert the number, I just haven't been able to get the text message to
go with it.

In the append to, I have written &"This comes from ConcernID #" & Comment
(Comment is the field I'm sending the concern id to).

I've tried to put it in the field name - that doesn't work.

I have access 2003.

Thanks for your help.


post the SQL
It should be something along the lines of

"INSERT INTO DestinationTable(field1, field2) VALUES ('Value1', 'This
comes from ConcernID #'" & me.txtComment & " ')"
  #5  
Old July 7th, 2009, 07:26 PM posted to microsoft.public.access.tablesdbdesign
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Append queries with added information

Try this --
INSERT INTO 852Complaints ( MgmtRevID, [Customer Code], [Customer Name],
Complaint, [Date of Complaint], Comments, PSID, hyperlink2 )
SELECT [852ConcernTable].MgmtRevID, [852ConcernTable].[Customer Code],
[852ConcernTable].[Customer Name], [852ConcernTable].Complaint,
[852ConcernTable].[Date of Complaint], "This comes from ConcernID #"
&[852ConcernTable].ConcernID, [852ConcernTable].PSID,
[852ConcernTable].CustDocuments
FROM 852ConcernTable
WHERE
((([852ConcernTable].ConcernID)=[forms]![852Complaintsform][852ConcernFORM]![ConcernID]));


"Bob Waggoner" wrote:

I'm trying to send a number field to a memo field with the added text "This
is the concernID". Here's the SQL (without the text).

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:53 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.