[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Visual Basic Append table from Subform

Posted on 2009-06-28
1
Medium Priority
?
434 Views
Last Modified: 2013-11-27
Hello everyone, I am trying to copy and append 3 fields as a new record in the same table from a subform of a subform based on the record the user is on.  

Private Sub plow_Click()
    Dim SQL As String
    SQL = "INSERT INTO [c resources] ( taskid, resacc, resunit )"
    SQL = SQL & "SELECT [c resources].taskid, [c resources].resacc, [c resources].resunit FROM [c resources]"
    SQL = SQL & "WHERE [c resources].resourceid = [forms]![a schedule Query Form Resources and Measures]![sfTasks]![sfResources]![resourceid];"
   
End Sub

Any ideas?
0
Comment
Question by:wellesleydpw
[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
1 Comment
 
LVL 77

Accepted Solution

by:
peter57r earned 2000 total points
ID: 24731476
SQL = SQL & "WHERE [c resources].resourceid =" &  [forms]![a schedule Query Form Resources and Measures]![sfTasks].Form![sfResources].Form![resourceid]

Assumes that all your names are correct and that recourceid is a number.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
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…

650 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