access-vba-recordset

How can I interact with other Office applications (Excel) using VBA in Access?

Need to write your Access data or query to an Excel file? Here is the how to do it: Most people are familiar with Excel and know how to use it well (enough), and when you start talking about Access, they get scared off, and don’t know what to do anymore. Well, here you are […]

Continue Reading

How To Generate A XML File With Access VBA

XML is used to structure your data. You can send a CSV file to another person, but using XML, you can structure your data in a more elegant format, and get very specific about your fields, and what data is contained within your tags (your field names). This is different than a basic CSV file […]

Continue Reading

Mouse Click Counter On Access Form

This post will demonstrate how you can count the number of clicks on your button in a certain time frame. It will function like a game . Here is the database form all in one: Option Compare Database Public m_dteStartTime As Date Public m_dteStopTime As Date Private Sub btnClicker_Click() Dim intValue As Integer Dim rst […]

Continue Reading

Shared Access Database Management

Here is a handy setup for those who need to manage a shared access database. Either you can create this from scratch as per the example or add the new tables to your existing database. This setup will track: 1. the users currently using the database 2. what time the user and computer name currently […]

Continue Reading

Access Database Users And Permissions Example

This post is a compilation of two of my previous posts: https://vbahowto.com/ms-access-object-security/ https://vbahowto.com/ms-access-login-form-revised/ This elaborates on the two posts a bit: First, here are all of the database objects: There are 2 tables here: tblLogin and tblAdmin Here are the main forms: frmLogin – this is the form that opens when the database opens Here […]

Continue Reading

MS Access Object Security

Today’s post is based on a question that I received. We are going to assume that there are multiple users who have rights to view different database objects. So in this example there are 3 user logins with different rights to access 3 forms and 3 reports. Here is an overview of the database setup: […]

Continue Reading

Here Is An Example Of The VBA Trim Function

The “Trim” function is useful in eliminating the blank spaces in a string normally caused by some data entry error. Why do you want to do this? Well because a sorting error can happen if you are trying to sort ” Dan, “Fred”, and “Ann”. ” Dan” will show up on top before “Ann” because […]

Continue Reading

How To Search A String With The VBA Instr Function

The VBA Instr Function is very useful for searching a string for a particular piece of text. If for example you want to loop a column or a field in a table of multiple rows, and want to identify prize rows that are 81.51, you would write something like this: Sub VBAInstrFunction() Dim dblTemp As […]

Continue Reading

Access Pagination

I have a client who has an underperforming continuous form so I start tinkering around with a model, and created an Access continuous form with pagination abilities. The database is attached. Hopefully it can help you. I will probably be modifying it as needed. [sourcecode language=”vb”] Option Compare Database ‘code 2014 by http://loeblcomservices.com ‘contact: erik@loeblcomservices.com […]

Continue Reading

How To Write A Recordset To File With VBA

In this video you’ll find out how to write a recordset to a file with VBA using the Microsoft Scripting Object. You’ll find out how to take your table data, and export it to a csv formatted file so you can share it with other applications. Use this method to get your data out of […]

Continue Reading