Dim rst As DAO.Recordset Dim strSQL As String Dim intLoop As Integer Dim fld As DAO.Field Set rst = CurrentDb.OpenRecordset("Select * From tblIntakeForms Where IntakeFormID = " & Nz(IntakeFormID, 0)) If Nz(IntakeFormID, 0) > 0 Then rst.Edit Else rst.AddNew End If For Each fld In rst.Fields If fld.Name <> "IntakeFormID" Then rst(fld.Name) = Me(fld.Name).Value Next fld If Nz(Me.IntakeFormID, 0) = 0 Then rst!AddedBy = GetCurrentUserName() rst.Update Me.IntakeFormID = rst!IntakeFormID rst.Close Set rst = Nothing
|Library not Registered||16||42|
|Using a function as opposed to "On Not in List" (or "Before Update")||10||31|
|MS Access Calculation wont work||5||35|
|Restrict list data depending upon user name||3||20|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
16 Experts available now in Live!