Recent content by kgcrowther

  1. K

    conditional check if recordset null

    Great discussion about recordset properties Thank you for the great discussion about recordset properties. I believe that I'll stick with the method recommended by RuralGuy, which seems to be the easiest - and is working fine. I gained a lot of insight from all the discussion in this thread...
  2. K

    conditional check if recordset null

    I would like to check if a recordset is null. The following simple code makes sense to me, but doesn't work (note the if statement, the rest is just context): SQL = "SELECT blah blah..." Set rsMembership = db.OpenRecordset(SQL) If rsMembership Then some operations ... End If The...
  3. K

    Update Table from Another

    I periodically need to update some of the tables in a database with data from a csv file. I wrote a little macro to import the csv file. I cannot just delete the table and then import, because I would have to manually break relationships, import the table, and then manually recreate the...
  4. K

    Matrix Operations with VBA?

    That's a good point about Excel. I had abandoned Excel since my matricies are larger than 256 and excel only allows 256 columns. Moreover, it Excel will only perform matrix inversion automatically for matrices smaller than 50x50, after that I have to use VBA anyway. However, your point is...
  5. K

    Matrix Operations with VBA?

    Access seems to be such a useful tool for data intensive analyses. I'm wondering if anyone has experience using tables and queries as matricies and performing matrix operations. For example, suppose I have a square table (where the number of fields equals the number of records). I could form...
  6. K

    DLookup from a Recordset?

    Thanks -- Much Faster Now Rural Guy, I thought and thought about how to do this, but I use the Lookup value to edit and add new records to the original table. I couldn't think of a way to do it with a query. Peter, I tried to use RecordSet.Index and RecordSet.Seek, but Access gave me an...
  7. K

    DLookup from a Recordset?

    I was using DLookup from a Query, but it was very slow (I assume Access must create the query each time I DLookup from it). Here is the original slow code that works fine, but slow: d8p3 = DLookup("[D8P3]", "SPLIT-Destinations", "[SCTG_CODE] = " & sctg2) I have three of these each time the do...
  8. K

    Convert query to table???

    I have a (crosstab) query that summarizes information in the way that I need for a module that I have written. However, I've noticed that the each time the module tries to pull a value from the query (every step of a Do loop) it takes seconds, compared to a "real-time" pull from a table. I...
  9. K

    Need to "split" records

    My prelim code work pretty good, Any advice for improvement I used the following code. It seemed to work pretty good. Any advice for improvement? Dim rs As DAO.Recordset Dim oreg As Integer, dreg As Integer Dim MyFlds(14) Dim sctg2 As Integer Dim d7p2 As Double, d7p3 As Double Dim f As...
  10. K

    Need to "split" records

    I have two tables: tblOne - contains regional data (e.g., fields = Region, Class, Num1, Num2) tblTwo - contains data to split regional numbers to smaller regions based on class and region. I would like to use the data in tblTwo to split regions in tblOne to either permanently update...
  11. K

    confusing declaration

    Thanks RG! I'm not sure I would have figured that out on my own! Is there a resource to learn more about checking the libraries in Tools->References? I noticed that Matlab is on the list. Does this mean I might be able to use some of the Matlab matrix functions through the VBA part of...
  12. K

    confusing declaration

    Some of the most simple things can confuse a beginner. I just want to bring a table in as an object. The following code gives me a type-mismatch error: Dim rs As Recordset Set rs = CurrentDb.OpenRecordset("states") MsgBox "Record count: " & rs.RecordCount However, the following code works...
  13. K

    Formatting alternate records in reports

    Thanks, that does help. That's what I needed to know. Kenneth
  14. K

    Formatting alternate records in reports

    I hope that someone reads this even at the end of a discussion string. I've made a report that I think would be great if I could apply this alternate shading. There are a couple of reports and so I'd like to define the code as a public function: Public Function AlternateGray() On Error Resume...
  15. K

    printing 'yes' or 'no' in report rather than check box

    I was wondering if it were possible to print words in a report rather than having a check box or toggle button. The reason is that I'm constantly exporting a report to word. It works great except the check boxes never export. It would be better to have words like 'complete' vs 'incomplete'...
Back
Top Bottom