Thanks for the help!
I need to "store the calculation" only long enough to figure it and then export - otherwise, I wouldn't be storing, you are right about that.
I'd begun thinking about using one of the other fields (like "city," as you suggest) but was having no luck until I got your post...
I think I've been trying to reinvent the wheel for about two days now.
Using a query (as opposed to a macro I'd have to run to update my table) I need to count how many entries in my db live in a particular state - and break these entries down into groups of, let's say 15, placing a...
How would I pull information (into my form) from the next or previous record? I've tried this: Me!NextPartTitle.Value = DLookup("[PageTitle]", "Articles", "[ID] = " & [ID] + 1)
which gets me into trouble when the id doesn't exist. Do I have to loop till it finds a higher-numbered ID? Or...
I got it to work - I'd made a mistake by using the .value property of the textbox instead .text. In the end, I was able to enter info into the text box, hit the enter key - and have the vba use the text from that tb, as I'd hoped. Simple now that I see it.
Private Sub...
Thanks - that almoooost works. I follow your code - till it comes to passing the value of the text box (Me!tbKeyWordsLike.Value). I haven't been able to get that. Should I add an "after update" to the text box?
Private Sub tbKeyWordsLike_KeyDown(KeyCode As Integer, Shift As Integer)
If...
Okay -this answer's gotta be simple, but I can't find anything in access help.
How do I tie an event to someone hitting the "enter" key after putting info into a particular text box?
Nope - still does it. I have noticed that what it's doing is sorting by the first digit:
8, 7, 4, 28, 27, 23, 2... etc.
There's gotta be a fix for that just staring me in the face; I just don't see it.
No problem -
Here's the SQL:
SELECT Articles.ID, Articles.PageTitle, GetWordCount('horse',1,[Article]) AS CountArt2
FROM Articles
ORDER BY GetWordCount('horse',1,[Article]) DESC;
Here's the UDF:
Function GetWordCount(strMyString, n, myField)
On Error Resume Next
StrippedWord =...
How do I get my query (which creates the row source for a list box) to sort correctly when the column I'm sorting on is a UDF? Apparently it's sorting before doing the calculations - not after. Rerunning the query in the list box's after change event simply reruns the query - which of course...
Okay - I stuck with it, burned a few more gray hairs and figured it out. The winning code looks like this:
WHERE (((Articles.ID) = " & [ID] & ") And ((GetWordCount([KeyWord], 1, [Article])) > " & Me.KeyWord_1.Value & ")) ORDER BY KeyWords.RS DESC;"
Apparently the two variables had to be...
Well, I've shot the last six hours or so trying to figure out where, how many and what type of quotes to use. I know this has got to be pretty simple - but I can't seem to see the rhyme and reason to how/when to use them.
I'm loading up the row source for a list box with a query. Picking up...
Hey - I (actually we) got it to work. When you requested the SQL code, something caught my eye as I pasted it - and I noticed that I was (mistakenly) dealing with errors by alternating between
IIf([Expr1]>0 ...
and
IIf([Expr3]<>"" ...
Setting them all to the latter fixed the issue.
Thanks...
But of course, here ya go:
SELECT KeyWordsInArticlesCount.Keyword, Max(KeyWordsInArticlesCount.Score) AS MaxOfScore
FROM KeyWordsInArticlesCount
GROUP BY KeyWordsInArticlesCount.Keyword;
Er... the "str" function shouldn't have been there - it was left over from one of many attempts (read: stabs in the dark) to convert the data. Please disregard the "str" function, that has since been removed.
I haven't put in a "where" - I've been trying "max" just to get it to output any...
I'm getting the infamous "Data type mismatch in criteria expression" in my totals query. The field causing the trouble is created in a separate query by simply adding the values of other fields like so:
Score: Str([Count1]+[Count2]+[Count3]+[Count4]+[Count5]+[Count6])
From what I can glean...
I created the switchboard using the tool provided via Tools > Database Utilities > Switchboard Mgr. The only thing listed on the sb is the button for the form I've described. (Oh - and I've added no addl code to it.) The code that the tool creates (to create the sb) is loooong - so I backed...
I replaced the code with that simple line - and... it's the same. Works great by opening it directly, stares at me if I open through the switchboard. How does opening it through the switchboard change it? Somehow that simple line means something to the file when opened one way - and...
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.