Recent content by jwcolby54

  1. jwcolby54

    Building a table for my book

    @MajP I thought I had put this to bed with @isladogs. I am not building a class from a table, I am building a table from a class. Both useful but obviously opposites.
  2. jwcolby54

    Building a table for my book

    No actually it was just a "There is so much to know". :D I know about enums and just wanted to have one to assist me (or the user) in selecting a field type without having to look up the integer value. I hadn't discovered DAO.DataTypeEnum until you just pointed it out. I'm going to go back in...
  3. jwcolby54

    Building a table for my book

    Well, I'm teaching how to use classes to do stuff, not manually building tables. If my reader wants to manually build tables they are free to do so of course. One of the reasons I decided to do this is that I did manually build the tables. Each field has a whole pane of properties down below...
  4. jwcolby54

    Building a table for my book

    A couple of extra table builders for hair and eye colors: ' ======================================================================================== ' Test_Build_tlkpEyeColor ' ---------------------------------------------------------------------------------------- ' PURPOSE: ' Builds a...
  5. jwcolby54

    Building a table for my book

    And finally documentation for the class, now found in the class header: ' ======================================================================================== ' clsTableBuilder ' ---------------------------------------------------------------------------------------- ' PURPOSE: '...
  6. jwcolby54

    Building a table for my book

    And of course when I get around to testing the SeedRows it doesn't function. A couple of iterations later: Public Sub SeedRows(ByVal lVntSeedData As Variant) Dim lRst As DAO.Recordset Dim lLngRow As Long Dim lLngFieldIndex As Long Dim lLngDataCol As Long Dim lClsFieldDef As...
  7. jwcolby54

    Building a table for my book

    In fact it does the opposite, but quite cool thing. I am building a table from scratch, he is building a class to build a table from an existing table. I did that ages ago, not sure I could even find my code for that but still, it is quite a useful thing. I could of course go build the tables...
  8. jwcolby54

    Building a table for my book

    Adding the ability to seed data into the table. This goes into clsTableBuilder: Public Sub SeedRows(ByVal lVntSeedData As Variant) Dim lRst As DAO.Recordset Dim lLngRow As Long Dim lLngCol As Long Dim lClsFieldDef As clsFieldDef Dim lStrFieldName As String If...
  9. jwcolby54

    Building a table for my book

    And a couple of additions for programmer assistance: ' === LOG TABLE STRUCTURE TO IMMEDIATE WINDOW === Private Sub LogStructure() Dim lClsFieldDef As clsFieldDef Debug.Print "Creating table: " & mStrTableName Debug.Print String(60, "-") For Each lClsFieldDef In mColFields...
  10. jwcolby54

    Building a table for my book

    I actually prompted ChatGPT with the following to get the test_Build_XXX code: Build a test function which builds tblPeople. It contains the following fields: PE_ID autonumber PE_FName Short TextPE_LName Short textPE_DOB Date/Time PE_IDEC Long Integer, indexed PE_IDHC Long Integer, Indexed...
  11. jwcolby54

    Building a table for my book

    Public Function Test_Build_tblPeople() On Error GoTo Test_Build_tblPeople_Error Dim lclsTableBuilder As clsTableBuilder Set lclsTableBuilder = New clsTableBuilder Dim lClsFieldDef As clsFieldDef lclsTableBuilder.Init "tblPeople" ' === PE_ID: AutoNumber PK === Set...
  12. jwcolby54

    Building a table for my book

    I have been thinking about how to build tables for my book, and how that might fit into the purpose of the book, learning about how to use classes. I want to build some pretty specific little tables. I'll get into the why in a minute. For now, know that I didn't write the following code, I...
  13. jwcolby54

    50/50 Chance of Working

    And I thought perhaps some objects don't have a tag property. Wouldn't it be nice if the error message included the property that didn't exist?
  14. jwcolby54

    Using ChatGPT as a personal editor

    My blog I have been working on a book EventDrivenProgrammingInVBA which I am placing in a public GitHub so that anyone interested in the subject can get a free copy. Writing a book is a lot of work. Additionally getting editorial assistance is problematic. This is a free thing, so I cannot...
  15. jwcolby54

    I need assistance pulling a big db into SQL Server

    Bulk import failed because This was a "csv" file. and there were many records with various fields with data enclosed in quotes "" containing commas. Some Field Data: "Some Piece, Some other piece, Some third piece" all in a single field in the table to be imported. CSV import expects the comma...
Back
Top Bottom