Solved

INSERT into table syntax

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

747 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

12 Experts available now in Live!

Get 1:1 Help Now