MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.
Private Sub cmdSave_Click() Dim Counter As Integer Dim AnalystCount As Integer 'Set the counter to blank Counter = 0 'Start with the first employee Me.EmpID = 1 'Count the number of analysts, so the loop knows when to stop AnalystCount = DCount("EmpID", "tblEmployees", "[Type]='Analyst'") 'Check to see if "All Analysts" is selected If Me.chkAllAnalysts.Value = -1 Then 'Loop through all this until we reach the last analyst Do Until Counter = AnalystCount 'Check to see if they're an analyst If Me.Type.Value = "Analyst" Then 'Add one to the counter Counter = Counter + 1 'Save the record Me.Dirty = False End If 'If we haven't reached the last analyst... If Counter <> AnalystCount Then '...move to the next employee Me.EmpID = EmpID + 1 End If Loop End If 'Let the user know that everything saved MsgBox "Saved!", vbOKOnly End Sub
|vba for Saving access tables to excel with password||4||18|
|Populating datasheet subform from VBA||6||12|
|Gracefully handling 'Record Locked' Errors||33||32|
|XML Node Counting in MS Access VBA||4||31|