I am a newbie to ASP and am trying to learn.
In my ASP page I have 2 SQL Select Statements.
I am passing a value (4+)that is stored in my (SubRs "Class")recordset to the 2nd SQL statement, but I want to extract only the first character and then add a wildcard. So that I can extract all...
I was not aware that you cannot copy from WORD to Access.
PHV & dhookom "You are both 'right'"
I learned a valuable lesson here. Don't use WORD.
You both get a star for fast response and valuable post to me. Thanks
After 3 days.....Saved my weekend, thanks
dhookom-
Let's say, I have a "Subject" it is in "Avg" condition. I have 3 comparables to that subject, in some sort of Condition. "avg","fair","Poor","excellent". If my subject is in Avg cond and my comparable is in poor condition then calculate a percentage. If comparable is in Excellent then...
SELECT qryTopThree.RecordID, IIf([Forms]![frmSubject]![Cond]=[“A”],IIf([Cond]=[“E”],-0.2*[SalePrice],
IIf([Cond]=[“G”],-0.1*[SalePrice],IIf([Cond]=[“A”],0,IIf([Cond]=[“F”],0.1*
[SalePrice],IIf([Cond]=[“P”],0.2*[SalePrice],0)))))) AS AdjACond
FROM qryTopThree;
*************************
I was...
MY SQL view Code:
SELECT TOP 3 Temp.RecordID AS RecordID, Temp.Cond AS Cond, Temp.FirstFourSeg AS FirstFourSeg, IIf([Forms]![frmSubject]![FirstFourSeg] Like '*bsm*',IIf([FirstFourSeg] Like '*bsm*',0,10000),0) AS AdjBSMSub, IIf([FirstFourSeg] Like '*bsm*',IIf([Forms]![frmSubject]![FirstFourSeg]...
1. Single quotes work. Double quotes DO NOT in the statement below that I wrote in a Query.My belief was that you were SUPPOSED to use double quotes.Double don't work below.
----------
AdjBSMSub: IIf([Forms]![frmSubject]![FirstFourSeg] Like '*bsm*',IIf([FirstFourSeg] Like '*bsm*',0,10000),0)...
I want to compare two values. The value that is on my form and the value(s) that are in the query. Ex: "If Value on form for [Cond] is "A" and true; & value for that field in the query is: E, G, A, F, or P. I want to calculate a value. There are 5 different values that can be on Form. E,G,A,F,P...
I tried your line of code and it kept erroring out and saying data mismatch. So I used a single quote around wildcard and it works. Thanks for the quick reply and helpfulness. I was running out of ideas.
"((CompSales.Nbhd) Like (Left([Forms]![frmSubject]![Nbhd], 1) & '*' )) AND" & _
When I have my original line it works with no error reporting.
"Where " & _
"((CompSales.Nbhd) Like [Forms]![frmSubject]![Nbhd]) AND" & _
But the new line crashes and reports: type mismatch
"Where " & _
"((CompSales.Nbhd) Like (Left([Forms]![frmSubject]![Nbhd], 1) & " * " )) AND" & _
I am using Access2003 and in VBA I have a NBHD of RJA. In the condition of my query,I want to query from the table all NBH that are like the first character that matches frmMyForm.NBH So I want to see all NBH that start with the letter R, regardless of length.
Suggestions for the syntax...
Set TopThree = CurrentDb.CreateQuerydef("TopThree")
strSQL = SELECT TOP 3 INSERT INTO TopThree(query)......????
Not to offend. This is not my code. I was trying to be descriptive in what I wanted.
Let me try something different.....
'Code is below
Set TopThree = currentDb..createQuerydef...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.