Solved

HELP AGAIN

Posted on 2006-06-24
8
268 Views
Last Modified: 2008-02-01
Both of my fields c.userid and o.userid are text fields but I keep getting a mismatched criteria error, but If i change them to number fields the form works.  But by doing that I mess up my entire site.  So how do I write this so that the text fields c.userid and o.userid work in this query

this is my query

SELECT c.*, o.userid, o.company
FROM paymaker AS c, freelance_customers AS o
WHERE c.userid = MMColParam AND c.userid = o.userid AND NXTFilter
ORDER BY c.pmdate DESC

Thank You
0
Comment
Question by:budgilbert67
8 Comments
 

Author Comment

by:budgilbert67
Comment Utility
By the way My pages are asp vbscript and my database is microsoft access
0
 
LVL 31

Expert Comment

by:awking00
Comment Utility
>> AND NXTFilter<< what? Equals something, is null?
0
 
LVL 34

Expert Comment

by:jefftwilley
Comment Utility
WHERE c.userid = MMColParam  <---is MMColParam text as well?
0
 
LVL 75

Expert Comment

by:Anthony Perkins
Comment Utility
>> >> AND NXTFilter<< what? Equals something, is null?<<
It is a boolean, as in True/False.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:budgilbert67
Comment Utility
SELECT c.*, o.*
FROM paymaker AS c, freelance_customers AS o
WHERE c.userid = MMColParam AND c.company = o.customer_ID AND NXTFilter
ORDER BY c.pmdate DESC

MMColParam       29          Session("kt_login_id")
NXTFilter
0
 

Author Comment

by:budgilbert67
Comment Utility
SELECT c.*, o.*
FROM paymaker AS c, freelance_customers AS o
WHERE c.userid = MMColParam AND c.company = o.customer_ID AND NXTFilter
ORDER BY c.pmdate DESC

MMColParam           29       Session("kt_login_id")
NXTFilter               1=1       Session("filter_tfi_listRecordset37")

You guys are great for trying to help me.   the problem is related to o.customer_ID because if I point this to another field this query works.  If I change c.userid to a number field this query works.  The problem is if I change it to a number field I will have to redo about twent pages.   I don't want to have to do that.  by the way this is my first attempt to use a link.
0
 
LVL 3

Accepted Solution

by:
cdemir earned 500 total points
Comment Utility
why don't you change "MMColParam"s type from integer to string like that :

 SELECT c.*, o.*
FROM paymaker AS c, freelance_customers AS o
WHERE c.userid = 'MMColParam' AND c.company = o.customer_ID AND NXTFilter
ORDER BY c.pmdate DESC


i think your problem is "data type incompatibly".

0
 
LVL 34

Expert Comment

by:jefftwilley
Comment Utility
I think you can change them to numeric just for this query using the Val() option.

WHERE Val(c.userid) = Val(MMColParam) AND c.company = o.customer_ID AND NXTFilter

something like that.
J

0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now