With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.
Private Sub UpdateEquipment() Dim rsNewRecord As dao.Recordset Dim ctl As Control Dim strField As String Dim rsUpdate As dao.Recordset If IsNull(DLookup("Code", "tblCarrierEquipment", "code = '" & Forms!frmCarrierLookup!CarrierCode & "'")) Then Set rsNewRecord = CurrentDb.OpenRecordset("tblCarrierEquipment") With rsNewRecord .AddNew .Fields("Code") = Forms!frmCarrierLookup!CarrierCode .Update End With End If Me.txtLastUpdateBy = Forms!gate!FName Me.txtLastUpdateDate = Date Set rsUpdate = CurrentDb.OpenRecordset("Select * from tblCarrierEquipment where code = '" & Forms!frmCarrierLookup!CarrierCode & "'") With rsUpdate For Each ctl In Me.Controls If TypeOf ctl Is CheckBox Then If ctl.Value = -1 Then strField = ctl.NAME .Edit .Fields(strField) = -1 .Update End If End If Next End With End If End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|How to use Recordset, returned from a SPROC as the recourdsource of a form.||24||52|
|How to append a form's present recordset to an existing table.||2||25|
|ISeries Remote Location Route entry||2||28|
|Refine Query to only display records with NON-NULL values in BOTH of two expressions||6||27|
Join the community of 500,000 technology professionals and ask your questions.