Function Check If Folder Exists

Function Test If Folder Exists VBA Code: Function FolderExists(sFile As Variant) As Boolean On Error Resume Next If Len(sFile) > 0 Then     FolderExists = (Len(Dir$(sFile, vbDirectory)) > 0&) End If End Function How to Use It: Put the VBA code above on form or in the Module and call it on the click button on your Access file where you want to check if this form exists before call process the next step. If you call a certain folder or file path that does not exist then you will get…

Read More

How to Get the Last Value of Certain Field

How to Get the Last Value of Certain Field In this How To, I will show how to get the last value of certain field from the last record. Sometime, we need a specific value of the last record. For this example, I need to get the value in Balance field from the last record which is $300.00 per the picture below. The last record is the ID field that has the biggest number which is 144. I will use DLookUp and DMax functions together to get the value $300.00…

Read More

How to Clear Items from Listbox

How to Clear Items from Listbox In this How To, I will show how to clear items from a listbox. I will use the form that I created for How to Add Items from File Dialog to Listbox and add a Clear List button. Step 1. Add Clear List button Under the Design Menu, click a Command button icon then place it below the Add File button Rename a button caption as Clear List Name a button under the Other tab of Property Sheet as cmdClearList Click Event tab of…

Read More

How to Add Items from File Dialog to Listbox

How to Add Items from File Dialog to Listbox How to create a Listbox is similar to creating a Combobox. You can see more details on Working with Combo box How To on my website.  In this How To, I will show how to add a file path or location from a file dialog into a list box. Step 1. Add List Box to Form Under the Design Menu, click a List Box icon then place it on top of form It will open the List Box Wizard below Click…

Read More

How to Add Items from Textbox to Listbox

How to Add Items to Listbox A Listbox is also well known like Combo box in the MS Access form. How to create a Listbox is similar to creating a Combobox. You can see more details on Working with Combo box How To on my website.  In this How To, I will show how to add an item from a textbox into a list box.  Step 1. Add List Box to Form –          Under the Design Menu, click a List Box icon then place it on top of form –         …

Read More

How to Load Items from Table to Listbox

How to Load Items to Listbox A Listbox is also well known like Combo box in the MS Access form. How to create a Listbox is similar to creating a Combobox. You can see more details on Working with Combo box on my website.  In this How To, I will show how to load the data from table into a list box when form is loaded. Step 1. Add List Box Under the Design Menu, click a List Box icon then place it on top of form It will open…

Read More

How to List a Field Name from Table in Combo box

How to Get a Field from Table into Combo box In this How To, I will demonstrate how to get a list of field name from a table into a combo box. In previous How To, I already guided you how to load the list of table name into a combo box when form is loaded. Now I want to show the list of field name of the table name that selected from the table list combo box step by step below. Create a combo box below the Table list…

Read More