Access VBA delete Table records with SQL using DoCMD.RunSQL Method

This Access VBA tutorial explains how to use VBA delete Table records with SQL without alert using DoCMD.RunSQL Method. You may also want to read: Access VBA run Query or run Action Query Access delete Table records In my previous post, I have explained how to delete Table records without using VBA, below is a quick recap. Suppose we have created a table called student in Access, which contains 5 student records. student Student ID Student Name 001 Apple 002 Bet...
Read More

VBA Excel Access roundup rounddown Function

This Excel Access tutorial explains how to use VBA to write an Access roundup (round up) and Access rounddown (round down) Function to simulate that in Excel. These roundup and rounddown Functions can also be used in Access and Excel VBA. Excel Access roundup rounddown Function In Excel Worksheet Function, there are round, roundup, rounddown, mround Functions. In Excel VBA, there is only round Function but no roundup, rounddown, mround Functions. The round Function is not the same as that i...
Read More

Access Excel VBA generate random password or random characters

This Access Excel VBA tutorial explains how to generate random password or random characters with random number, random letters and random symbols. You may also want to read: Excel VBA generate non-duplicated random number Excel VBA Rnd Function to generate random number Access Excel VBA generate random password or random characters If you are a system administrator, very likely you need to genrate login password for users. Some people who are not good at Excel generate password com...
Read More

Access Excel VBA sort Array items

This Access Excel VBA tutorial explains how to sort Array items in VBA in ascending order / descending order. You may also want to read: Use VBA Excel Function to sort data in ascending order Access Excel VBA sort Array items In an Array, you may have stored items that you want to sort. For example, if you store a name list, you may want to sort them in alphabetical order (Apple, Banana, Cat...).  If you store a number list, you may want to sort them in ascending order (100, 200, 400, 70...
Read More

Access Excel VBA convert number to English words

This Access Excel VBA tutorial explains how to convert number to English words in VBA. Access Excel VBA convert number to English words I want to share a custom Function I found in Microsoft Support website, which is to convert number to English words using Excel VBA (also applicable to Access). I want to highlight that the article is unlike other articles written by other contributors, this article has no author and I believe this Function was created by the Microsoft engineers, so this custo...
Read More

Access VBA import workbook to Access using Transferspreadsheet

This Access tutorial explains how to import workbook to Access using DoCmd.Transferspreadsheet Method, such as importing specific worksheet to Access, importing multiple worksheets to Access. You may also want to read: Access VBA DoCmd.OutputTo Method Access Export all Queries to Excel Access VBA import workbook to Access using DoCmd.Transferspreadsheet Access VBA DoCmd.Transferspreadsheet Method is used to import workbook to Access and export Access to workbook, I have briefly demo...
Read More

Access VBA run Query or run Action Query

This Access VBA tutorial explains how to run Query and run Action Query in Access VBA. You may also want to read: Access VBA delete Table records with SQL using DoCMD.RunSQL Method Access VBA run Query or Action Query Imagine you have to run 10 Action Query (e.g. Create Table, Update, Delete Table) in a row to get the final result, you have to run each Action Query one by one and the most annoying part is to click the confirmation dialogs. With Access VBA we can run a series of Action Qu...
Read More

Access VBA loop through all Tables using DAO.TableDef

This Access VBA tutorial explains how to loop through all Tables using DAO.TableDef in Access. You may also want to read: Access VBA loop through Table records Access VBA loop through all Tables Let's say we use a Macro to import 100 Tables and then we want to delete them all. It is time consuming for us to delete one by one and there is a high risk of manual error of deleting the wrong one. In this case we want to write a Macro to loop through all Tables to delete all Tables that meet c...
Read More

Access VBA delete Table using DoCmd.DeleteObject Method

This Access VBA tutorial explains how to delete Table (delete single table, delete multiple tables) in VBA using DoCmd.DeleteObject Method. You may also want to read: Access delete table records Access VBA delete Table In Access VBA, deleting Table can be done by DoCmd.DeleteObject Method. It is an extremely simple and straight forward, the syntax is as below. In order to delete Table, use acTable in the ObjectType argument. DoCmd.DeleteObject(ObjectType, ObjectName) Name Requ...
Read More

Access VBA import txt using DoCmd.TransferText Method

This Access VBA tutorial explains how to import txt using DoCmd.TransferText Method in one Table or separate Table. Microsoft Access - import TXT using DoCmd.TransferText Method In my previous post , I explained how to use DoCmd.TransferText Method to export queries to files such as txt, this tutorial explains how to import txt into Table. First prepare a TXT file such as below Then import the txt file manually. Before the final step, create a specification (which field is what data ...
Read More