VBA Has No Class

Recently, I was working on one of my apps, one that is database centric. Whilst making some changes, I came across this piece of code that inserts a new record into the database With RS .AddNew .Fields(FIELD_AUDIT_DATE) = sh.Cells(Rownum, COL_FU_AUDIT_DATE).Value .Fields(FIELD_CONSULTANT_ID) = GenerateID(FIELD_CONSULTANT_ID, Designer) .Fields(FIELD_SALES_TYPE_ID) = GenerateID(FIELD_SALES_TYPE_ID, sh.Cells(Rownum, COL_FU_SALES_TYPE).Value) .Fields(FIELD_CUSTOMER) = sh.Cells(Rownum, COL_FU_CUSTOMER).Value .Fields(FIELD_QUOTE_NUMBER) = QuoteNumber .Fields(FIELD_PRODUCT_ID) = GenerateID(FIELD_PRODUCT_ID, sh.Cells(Rownum, COL_FU_PRODUCT).Value) .Fields(FIELD_QUOTE_DATE) = sh.Cells(Rownum, COL_FU_QUOTE_DATE).Value .Fields(FIELD_QUOTE_AMOUNT) = sh.Cells(Rownum, COL_FU_QUOTE_AMOUNT).Value .Fields(FIELD_ESTIMATED_PROFIT) = sh.Cells(Rownum, COL_FU_PROFIT).Value .Fields(FIELD_REVISED_QUOTE) = sh.Cells(Rownum, COL_FU_REVISED_QUOTE).Value .Fields(FIELD_ACTUAL_PROFIT) = sh.Cells(Rownum, COL_FU_ACTUAL_PROFIT).Value .Fields(FIELD_STATUS_ID) = GenerateID(FIELD_STATUS_ID, sh.Cells(Rownum, COL_FU_QUOTE_STATUS).Value) .Fields(FIELD_DECLINED_ID) = GenerateID(FIELD_DECLINED_ID, sh.Cells(Rownum, COL_FU_DECLINED).Value) .Fields(FIELD_QUOTE_NOTES) = sh.Cells(Rownum, COL_FU_NOTES).Value .Fields(FIELD_UPDATED_BY) = ThisApp.LogonUser .Fields(FIELD_UPDATED_ON) = … Continue reading VBA Has No Class

SUMPRODUCT Isn’t The Only SP Kid In Town

If you are a frequent use of SQL Server, or any such enterprise database solution, you are bound to be aware of Stored Procedures (SPs) and the advantages that they bring. In my experience, using SPs is almost de-facto in the SQL Server world.   However, it does not seem so prevalent in the Access databases and applications that I have seen. Presumably, this is because Access applications are very closely bound to the Access database, and the rationale drops off somewhat. But I never use the Access UI myself, although I have created many applications where Access is my … Continue reading SUMPRODUCT Isn’t The Only SP Kid In Town