Recent content by dwhitman

  1. D

    New Computer - Optimized for MS Access

    Ha! Lots of good discussion here, thanks. I think dkinley brings up a really important point, that a system needs to be balanced - doesn't do any good to have a really fast cpu if the motherboard can't keep up. No good having a really fast drive if a task is compute-bound on the CPU. I...
  2. D

    New Computer - Optimized for MS Access

    I'll be buying a new computer soon, and (as I do every time) I'm agonizing over how to allocate my budget among various options. Over the years I've attempted to optimize my hardware choices based on whatever activity seems to be dominating my computer use at the time. So I've had a gaming...
  3. D

    Using VBA to change the datatype of a column

    I recently needed a routine to change field type, and found a chunk of code here: http://accessblog.net/2007/03/how-to-change-field-type-using-dao.html that did the job. You can't do it directly in DAO, but the routine just makes a new field with the new type, then copies the data over and...
  4. D

    For Each...Next not looping over entire TableDef collection?

    For Each may not work right if deleting items Seems like Banana has this running ok, but at one point he notes that that first For Each loop wasn't deleting all the linked tables. This looks very similar to a problem I just had deleting relations by cycling through a collection with a For Each...
  5. D

    Delete Relation from VB - incomplete job

    I used a FOR EACH in my original attempt at this, and it seemed to have the problem Pat cites; see the code fragment in my first post. I suspect that success with the FOR EACH code snippet from that other thread depends on the order of the references and how many of them there are in the...
  6. D

    Delete Relation from VB - incomplete job

    Yep, it works Pat, thanks again, your suggestion worked perfectly. In case it could help someone else down the line, here's my code implementing your idea: Sub deleteRelations() Dim db As DAO.Database Dim i As Integer Set db = CurrentDb For i = db.Relations.Count - 1 To 0 Step -1 If...
  7. D

    Delete Relation from VB - incomplete job

    Thanks! Pat, your explanation makes perfect sense. Let me give that a try.
  8. D

    Delete Relation from VB - incomplete job

    I'm trying to delete all the relations to a table ("voters") in preparation for deleting it. I see a code fragment in this thread that is supposed to do the job: http://www.access-programmers.co.uk/forums/showthread.php?t=33182 ...and the code I wrote before searching seems pretty equivalent...
  9. D

    construct dynamic field references in VB?

    Ah, that's a GREAT suggestion. Let me noodle around with that for a while. It also occurs to me that the main place I call this function is in an update query that populates a new field based on the calculation. And while there are some other places I'd use an "intelligent" version of the...
  10. D

    construct dynamic field references in VB?

    There's a calculated field in a query that wants an integer count of the number of times a voter has actually come out to the polls, based on whether some other fields in that same record have some text in them, or are null. I have a working function that returns this count when I pass the...
  11. D

    construct dynamic field references in VB?

    Thanks again! I found the trick of declaring as a DAO.recordset elsewhere just before your reply hit, but you cut to the heart of the problem in the later part of your post. As written, I obviously need to tell the function which record to look at, and I agree with your assessment - sounds...
  12. D

    construct dynamic field references in VB?

    DJkarl: Thanks for sticking with me. I made the changes you suggest, but I'm still got a type mismatch error on the OpenRecordSet line. Googled around and found a suggestion to disambiguate the recordset (DAO vs. ADO), and managed to make that go away. Above and beyond that, I'm a little...
  13. D

    construct dynamic field references in VB?

    DJKarl: Thanks, but I don't this goes to what my problem is. The field names are predictable, and I can construct them as strings pretty easily. Where I'm clueless is once I have these strings, I can't figure out a way to actually refer to the fields within VB using the string. Your code did...
  14. D

    construct dynamic field references in VB?

    The heart of my db is a large table ([voters]) that I receive periodically from an outside source. Within the table is a series of fields that represent the voting history of each voter. Over time, new fields are added to the table representing each election as it happens, and older fields are...
Top Bottom