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 23rd, 2003, 02:14 AM
Authorized User
 
Join Date: Jun 2003
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to maha
Default Extract Field Value

I have a form with a text box. I want to be able to extract the value in the that field within a query. For example, my form name MyForm, the text field name txtTransportCost.

My Query statement:
SELECT myTable.Field1, Forms!MyForm!txtTransportCost AS TransportCost
FROM myTable

However, this query only displays the contents of Field1 and TransportCost is Null.

I wish to extract that value in the text box in MyForm. How to do that?

Thanks,
Maha
 
Old June 23rd, 2003, 09:27 AM
Authorized User
 
Join Date: Jun 2003
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try changing your SQL statement to this...

SELECT myTable.Field1, Forms!myForm!txtTransportCost.text AS TransportCost
FROM myTable;

That should do it.

Kenny Alligood
 
Old June 25th, 2003, 12:05 AM
Authorized User
 
Join Date: Jun 2003
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to maha
Default

Hi Friend,

Thanks for you reply. I managed to find the solution.

Many thanks again.
Maha:)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Extract data from memo field knix2007 Access VBA 7 December 17th, 2007 03:24 PM
T-SQl Extract gregalb SQL Server 2000 2 March 14th, 2007 12:59 AM
how to extract from a string fraijo SQL Server 2000 3 October 25th, 2006 09:55 PM
Extract part of field from inconsistent data Roly Reefer Access VBA 4 March 31st, 2005 09:25 AM





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