Solved

INSERT into table syntax

Posted on 2014-10-02
4
187 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
  • 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 36

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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

829 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