Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 9th, 2006, 03:31 AM
Authorized User
 
Join Date: May 2006
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default Query Help

Hi there.

I have a query that should take the details from the current form, and write them to a csv. But the query is not taking the info from the form it is taking it from a table. So basically i am looking for it to take details from the record and not the table. Is there any SQL that would do this.

Thanks

Allan

 
Old June 9th, 2006, 06:27 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Yes, you will always get the data from the table and not the form. You need to specify the relationship fields in your SQL statement, or in your code. For example:

"SELECT * FROM tblYourTable WHERE [ID] = " & YourID

This will limit the records in your results to those you see in the subform. In fact, that is how the subform limits its records.

Does this help?

mmcdonal
 
Old June 9th, 2006, 08:16 AM
Authorized User
 
Join Date: May 2006
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, thanks a lot :D






Similar Threads
Thread Thread Starter Forum Replies Last Post
Output Query to txt file from SQL Query everest SQL Server 2005 4 November 22nd, 2007 01:49 AM
how to make a query from an existing query raport SQL Language 3 November 13th, 2006 08:59 PM
I solved insert query.now see this Update Query. amit_mande@yahoo.com VB.NET 2002/2003 Basics 2 September 21st, 2006 12:48 AM
Syntax error in query. Incomplete query clause. dispickle ADO.NET 3 April 16th, 2004 01:04 PM
Error on Make-Table Query In Union Query rylemer Access 1 August 20th, 2003 07:42 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.