Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. tvsmvp

    Working with ranges - counting subgroups and assigning numbers

    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...
  2. tvsmvp

    Working with ranges - counting subgroups and assigning numbers

    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...
  3. tvsmvp

    How do I pull info from the next record?

    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...
  4. tvsmvp

    How do I tie an event to hitting the enter key?

    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...
  5. tvsmvp

    How do I tie an event to hitting the enter key?

    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...
  6. tvsmvp

    How do I tie an event to hitting the enter key?

    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?
  7. tvsmvp

    How do I sort a query when one field is based on a UDF?

    Yes! Genius! The addition of "as integer" worked like a charm. Thanks!
  8. tvsmvp

    How do I sort a query when one field is based on a UDF?

    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.
  9. tvsmvp

    How do I sort a query when one field is based on a UDF?

    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 =...
  10. tvsmvp

    How do I sort a query when one field is based on a UDF?

    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...
  11. tvsmvp

    Quotes in a query: when to use single, double and none at all

    Thanks for the info - I'll use it and keep that bookmarked.
  12. tvsmvp

    Quotes in a query: when to use single, double and none at all

    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...
  13. tvsmvp

    Quotes in a query: when to use single, double and none at all

    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...
  14. tvsmvp

    Data type mismatch in criteria expression in my totals query

    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...
  15. tvsmvp

    Data type mismatch in criteria expression in my totals query

    But of course, here ya go: SELECT KeyWordsInArticlesCount.Keyword, Max(KeyWordsInArticlesCount.Score) AS MaxOfScore FROM KeyWordsInArticlesCount GROUP BY KeyWordsInArticlesCount.Keyword;
  16. tvsmvp

    Data type mismatch in criteria expression in my totals query

    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...
  17. tvsmvp

    Data type mismatch in criteria expression in my totals query

    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...
  18. tvsmvp

    My form won't synch to listbox when opened from switchboard

    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...
  19. tvsmvp

    My form won't synch to listbox when opened from switchboard

    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...

Part and Inventory Search

Back
Top