This category holds articles regarding Access VBA, but also general things I come accross Access and its usage in companies.
The following method exports all available queries in an Access database into individual text files, which are called like the corresponding query.
DAO does not provide the support ADODB gives you, therefore this method will only work with queries created and stored in a current MS Access database.
The method writeLineToTextFile is not a standard VBA method, but can be found at following URL.
The target encoding should not be UTF-16LE but ASCII, if you intend to use a versioning tool like GIT to keep track of changes in MS Access queries.
Replacing special characters can be a pain, if you do not rely on regular expressions.
Delete a file on a users hard disc (VBScript, which can easily be adjusted to VBA).
- Hits: 9537
If you want to join two tables in MS Access using the LIKE operator you will fail receiving an error message stating the following.
"JOIN expression not supported."
MS Access SQL
The SQL producing above error looks as follows.
You can fix this by changing the SQL to define the JOIN condition in the WHERE part of a statement.
- Hits: 8478
If you have to change the sort order of data returned in a RecordSet to behave case sensitive in VBA you can use a trick, which is provided by Microsoft.
The below function returns a hexadecimal representation of a handed String, which can then be used in an ORDER BY clause of a sequel statement.
Original Source is available at following URL.
- Hits: 8621
Access VBA DAO Article Count: 2
Page 1 of 3