Solved

INSERT into table syntax

Posted on 2014-10-02
4
180 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 34

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

911 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now