Let assume your ID column is in Column A, Date in column B, Type in column C and Done In Column D
without using DAO.Recordset:
Sub UpdateDoneColumnOnSheet1()
Dim ws As Worksheet
Dim lastRow As Long
Dim rng As Range
Set ws = ThisWorkbook.Sheets("Sheet1")
lastRow =...
as advised by the others, you do not need to save the period_month, period_year, accounting_month and accounting_year to the table.
you use query to show them (see qryInvestTrans2 query).
here is a simple db that employs Login form.
username/password: common => will have limited access on the db.
username/password: arnel/nozup => admin account, have unlimited access and can set/assign user and user-right to the system.
if you want to share the db so we can see what is the problem, you can convert your linked table to local table by right-clicking on them, and
selecting "Convert To Local Table".
you can simplify it:
Public Function VisibleList(frm As Form) As ListBox
Set VisibleList = frm.lstTrans
If frm.lstName.Visible = True Then
Set VisibleList = frm.lstName
End If
End Function
on your code:
Dim lst as listbox
set lst = VisibleList()
you may also try this:
Function GetDateRange(DateField As String, RangeType As Integer) As String
'Last Month
Dim firstmonth As Date
Dim lastmonth As Date
firstmonth = DateSerial(Year(Date), Month(Date), 0)
lastmonth = DateSerial(Year(firstmonth), Month(firstmonth) - 12, 0)
'Quarterly...