User Profile
Collapse
-
If the field is only delimited by spaces and CRs, then shouldn't you be able to just take the entire memo field, split it by the CRs [Chr(13)] and then split the results by the spaces [Chr(32)]? -
Quick and dirty info on SQL JOINs:
http://en.wikipedia.org/wiki/Join_%28SQL%29
You'll generally want to be concerned with INNER and LEFT JOIN statements, I think. A lot of the other JOIN types have their uses, but are less common.
[Edit: Ah-ha! I found a page that's got Venn diagrams. Those are useful for seeing "how" different JOINs work, except for cross joins, which are insane and nearly useless!]...Leave a comment:
-
Eureka! RecordsetClone worked, OpenRecordset didn't. :)
Thanks much, Rabbit! That made my 4 day xmas weekend much nicer.. no having to remote in from home to click a button once a day! :)Leave a comment:
-
It doesn't seem to like Me.Recordset.Bo okmark. (I'm using Access 2000, if that makes a difference.)
If I just add Me.Bookmark = rs.Bookmark, I get an error of "Not a valid bookmark."
Watches on these show the following:
Me.Bookmark:
Me.Bookmark(0) = 0
Me.Bookmark(1) = 2
Me.Bookmark(2) = 0
Me.Bookmark(3) = 0
rs.Bookmark:
rs.Bookmark(0) = 0...Leave a comment:
-
Ohh! Yeah, I see what it's doing there. It's counting the records per area but not the distinct records.
What you'd need is something more along the lines of a subquery that returns a distinct list of areas and postcodes (like the original one I gave you) and put that inside a query that just counts the postcodes grouped by area.
I'm honestly better at this with MS SQL than Access; Access's SQL implementation is a bit...Leave a comment:
-
Oh...Wait a minute. I think -maybe- I was overcomplicatin g things.
How about this?
SELECT DISTINCT Spare2, COUNT(postcode)
FROM Table1
GROUP BY Spare2Leave a comment:
-
[Completely insane post edited out!]
See post below. [Mods, feel free to remove this one!]Leave a comment:
-
To embed a query within a query, just use parentheses.
SELECT This, That, (SELECT TheOtherThing FROM Here WHERE This = 'That') As 'Result'
FROM ThisPlace
WHERE Something = 'Nothing'
You can place an entire query within another query that way, as long as it only returns one value.Leave a comment:
-
Select record in form_load?
I have a super simple Access DB with four tables and one form.. I'm an old hand at Excel VBA but am just starting with Access, so this is likely a totally stupid question, but here goes anyway.
In Form_Load() for the form, I have a time based trigger that lets the DB execute a macro and automatically quit when the macro is completed so I can run overnight maintenance where it runs some SQL queries on external databases, and builds... -
You can manipulate anything in Excel with VBA through Access that you can within Excel itself, if you declare an Excel application object...
Once you've done that, you can just programmaticall y select the rows you want and use .Selection.Rows .Group in VBA to group the rows.
Here's a snippet of something I recently tacked together for generating Excel documents based on a template (it was easier for me to use a template...Leave a comment:
No activity results to display
Show More
Leave a comment: