User Forum
Xequte User Forums
Profile    Active Topics    Forum FAQ    Search this forumSearch
     
Forum Tips
» This forum is for users to discuss their software problems and suggestions for improvement.  Remember that only a tiny percentage of our users experience such problems (To be precise less than 0.7% have ever posted on this forum)
» Include your software version number (as displayed in the About Box)
» Check the FAQ before posting as most common questions have already been answered
» You don't need to also e-mail us separately as our support team will respond to all questions on this forum
 
 All Forums
 Xequte User Forums
 MailList King
 Queries in Access

Note: You must be registered in order to post a reply.

Size 
UserName:
Password:
Mode 
Format  BoldItalicizedUnderline Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailBrowse for an image to attach to your post Insert CodeInsert QuoteInsert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
bell1jl Posted - Mar 03 2009 : 18:25:11
I'm trying to query the MLK database from Access 2003. I have the ODBC driver installed and I can pull up all the records in the MLK database just fine. I want to create a query that will allow me to type in a last name and return the record in Access.

I have successfully created a query that prompts me to input an integer for the number of groups joined -- the query returns all the users who have a GroupMembership equal to that number. The query looks like so:

SELECT *
FROM mlk_main
WHERE (((mlk_main.GroupMembership)=[Number of Groups]));


However, when I do the same thing and replace "mlk_main.GroupMembership" mlk_main.LastName and prompt for the last name, it returns nothing. Does the ODBC driver need some special to query against strings? It seems like it should just work but I've been banging my head against a wall trying to query this DB.

Also, I am unable to write to the database, I get a record lock warning. I'm on Vista using Access 2003 and the latest (I think) ODBC driver that I downloaded only days ago.

I really need some help with this.

Thanks
3   L A T E S T    R E P L I E S    (Newest First)
bell1jl Posted - Mar 04 2009 : 16:29:37
I wanted to let you know that I did get it work based on your feedback above! In Access, "UPPER" isn't a recognized command but UCASE is. I ended up using this syntax:

SELECT*
FROM mlk_main
WHERE ucase(mlk_main.LastName)=[Last Name]

I've played around with it and for whatever reason, I need to include the UCASE conversion in the query for it to return anything. Odder still, I can pass in the last name in all lowercase, uppercase, or mixed case and it still returns the results -- very bizzare but it works.

Thank you!
bell1jl Posted - Mar 04 2009 : 10:48:11
Hard coded queries work, just not when I try to use a parameter. However, I AM able to use a parameter if I'm querying an integer like the user ID field or something. So, I know I can pass parameters, there just seems to be something wrong when I go to use a parameter to query a string.
xequte Posted - Mar 03 2009 : 22:17:27
Is casing an issue? Are you using UPPER()?

How about if you do a hard coded query:

SELECT * FROM mlk_main
WHERE (UPPER(mlk_main.LastName)="SMITH")



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com