I have a following code in my access vba on button click event. Idea is to use temporary variable to forward a value from textbox into the subform:
Private Sub button_novi_ir_Click()
On Error GoTo button_novi_ir_Click_Err
On Error Resume Next
TempVars("brojRN").Value = Me.brojRNtxt
DoCmd.OpenForm "PODACI_O_IZVRŠENIM RADOVIMA_FORM", acNormal, "", "", acAdd, acNormal
If (MacroError <> 0) Then
Beep
MsgBox MacroError.Description, vbOKOnly, ""
End If
button_novi_ir_Click_Exit:
Exit Sub
button_novi_ir_Click_Err:
MsgBox Error$
Resume button_novi_ir_Click_Exit
End Sub
Each time i click the button I get an error message "A problem occurred while MS Office Access was communicating with the OLE server or ActiveX Control". I really have no idea what to do about it. So, please can anyone point me in the right direction?
Thanks in advance!