Hello and thank you both for your appreciate answers. Finally I've converted the Macro into VBA in a way I can access it, and in the navigation panel now I have the module for the Macro to access it through VBA. Here's the code of the Macro so far:
Code:
Function OnClick()
On Error GoTo OnClick_Err
With CodeContextObject
If (IsNull(Forms![Company Detail]!Id)) Then
Beep
End If
If (Not IsNull(Forms![Company Detail]!Id)) Then
DoCmd.OpenForm "Company Detail", acNormal, "", "[Id]=" & .Id, , acDialog
End If
End With
OnClick_Exit:
Exit Function
OnClick_Err:
MsgBox Error$
Resume OnClick_Exit
End Function
For the moment, I think the code will work to what I'm doing. However, I'm still reluctanct when it comes to add code because I may change something I don't wish to. Which would be the code to add at the beginning so the form can be opened and not appear the error message? Did you already post it?
I'll keep checking Access documentation and try to familiarize more with it. I'd also like to, as said before, the elements in the sub-form (the names of the companies) appear like a hyperlink so it is more visual that you may click on it to see information. Again, thank you very much, this is being really useful for me thank you.