?
Solved

INSERT into table syntax

Posted on 2014-10-02
4
Medium Priority
?
192 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 2000 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

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Suggested Courses

770 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