Solved

INSERT into table syntax

Posted on 2014-10-02
4
191 Views
Last Modified: 2014-10-02
Using VBA code I want to insert records into a temporary table named "tblTempRunningNotes".  I want the records that get written to this table to come from another table named "tblMemberRunningNotes".  But I only want the records using Forms!frmFormName!txtMemberID.  (MemberID is the field in the source table.

I tried this with an make table query but am not pleased with the results because a memo field contents cut off at 255 characters so I'm hoping INSERT code will work better.

--Steve
0
Comment
Question by:SteveL13
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 

Author Comment

by:SteveL13
ID: 40357133
Incidentally, there will be one or more record related to MemberID.  I want all of them to be inserted into the temporary table.
0
 
LVL 38

Accepted Solution

by:
PatHartman earned 500 total points
ID: 40357156
The easiest way to build a query is to use the QBE.

1. Open the QBE and add the "from" table
2. Select the columns you want from it
3. Change the query type to append and choose the target table.
4. Assuming the column names are the same in both tables, Access will populate the Append To cell.  If the names are different, you will need to manually enter the target field.  
5. Add the selection criteria for MemberID -- Forms!frmFormName!txtMemberID
6. Save the query with an appropriate name.
7. Change your code to run this query.
0
 

Author Comment

by:SteveL13
ID: 40357174
Unreal.  That worked.  But I wonder why the make table query didn't bring over all of the characters in the memo field????

Thanks MUCH!!!
0
 

Author Closing Comment

by:SteveL13
ID: 40357178
Super!!!
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question