Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA 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 July 20th, 2004, 03:15 PM
Authorized User
 
Join Date: Jun 2004
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default Eliminating spaces in a query - ???

Hello.

I have a query, in which i'm trying to select a number that has the value of 'x'. But since the file specs for this particular field has a text value of 20. I tried using trim for this query, to pick out the spaces, but it isn't working. Help!!!

Snoopy92211

This is my query. It's not working! :(

SELECT *
FROM tblsnoopy
WHERE (((trim([blahblah])) In ('123')));

(blahblah is a field in tblsnoopy with a length of 20 but the value is usually only three numbers, as shown in this example)
Thanks a lot.


 
Old July 26th, 2004, 11:47 PM
Authorized User
 
Join Date: Oct 2003
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I believe your WHERE statement is syntaxed incorrectly. Is blahblah an integer field, if so, then no quotes.

"WHERE trim([blahblah]) = 123;"

If not, then..

"WHERE trim([blahblah]) = '123';"

Good Luck.








Similar Threads
Thread Thread Starter Forum Replies Last Post
Eliminating Newlines muki XSLT 0 October 24th, 2005 09:49 PM
Eliminating Redundant Records spraveens MySQL 1 May 12th, 2004 04:21 AM
eliminating duplicate data erin SQL Language 2 April 22nd, 2004 11:49 AM
eliminating all but 1 of duplicates nlicata SQL Server 2000 3 November 21st, 2003 04:52 PM
Eliminating HTML TAGs beyondforsaken VB How-To 12 June 12th, 2003 08:00 AM





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