Congratulations to AcaCandy on her 100,000th post!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer backup black screen blue screen boot bsod computer connection crash css dell driver drivers email error ethernet excel explorer firefox firefox 3 game hard drive internet internet explorer itunes laptop linux malware monitor network networking nvidia outlook outlook 2003 outlook 2007 outlook express partition problem router slow software sound trojan usb video virus vista windows windows xp wireless
Business Applications
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Business Applications >
Solved: Select * SQL Code not returning all values


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
dacree324's Avatar
Junior Member with 8 posts.
 
Join Date: Jul 2008
Experience: Intermediate
23-Jul-2008, 11:40 AM #1
Solved: Select * SQL Code not returning all values
I am using a line of SQL code to change the record source on one of the forms I use after a sort is performed by the user.

Form_frm_ClientContactInformation.RecordSource = "SELECT * FROM tbl_ClientContactInformation INNER JOIN tbl_Account ON tbl_Account.[Account PSID]=tbl_ClientContactInformation.AccountPSID WHERE (((tbl_Account.AccountName) Like '*" & txtAccountName & "*'))"

The user puts in the Account Name, but because the name is not stored with the Client, the AccountPSID is, i have to compare the places where AccountPSID and Account PSID (client and account, respectivly) are the same, and filter it as such.

It works on all but one field. Randomly, when I use this and look at my new results on the ClientContactInformation page that results, the City field will appear as #Name?

I've done some basic troubleshooting, such as changing the control to make sure to point to City, and I've compared the City control to something else, like State, which is appearing, and they are identical except for obvious exceptions.

Is there a problem with the code, or is something more sinister occuring?
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 6,554 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
23-Jul-2008, 02:19 PM #2
Have you tried putting the SQL in to a Query to see wehat results you get.
Without seeing the database it is very difficult to know what is going wrong.
dacree324's Avatar
Junior Member with 8 posts.
 
Join Date: Jul 2008
Experience: Intermediate
24-Jul-2008, 09:35 AM #3
Database Example
i'm having problems getting the zipped version of the file down to the manditory 500k, im stuck at around 700. I'm using winzip, is there a better way to do it?
dacree324's Avatar
Junior Member with 8 posts.
 
Join Date: Jul 2008
Experience: Intermediate
24-Jul-2008, 12:02 PM #4
OBP,

I took your suggestion and put the sql code into the analyzer and looked at it. The problem is that in my Account table and in my Client table, I have fields marked as City. They would appear as tbl_Account.City and tbl_ClientContactInformation.City, which is not what the control was looking for! When I changed the name in the Client table, and reran the query, I was able to get the city to appear.

Thank you!
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 03:11 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.