I have a subform which is launched from a command button on my main form. When this form opens, I have 2 fields which I have inserted VBA Code into to capture the information in two of the fields on the main form, so I can sync and track the data entered into the subform to the record on the mainform.
In the "Got Focus" event of each of the two fields I've inserted the following code, to capture the data from the main form:
Expand|Select|Wrap|Line Numbers
- Me.ActiveControl = Forms!F_KSM_Contacts_Sc!SM_Contacts_ID
Expand|Select|Wrap|Line Numbers
- Me.ActiveControl = Forms!F_KSM_Contacts_Sc![SM_S-PersonRef]
I have tried using SendKeys to try and send a "Tab" command using:
Expand|Select|Wrap|Line Numbers
- SendKeys vbKeyTab, 0
Any suggestions for the easiest way to do this? I'm a beginner at VBA and I have a bit of trouble translating the syntax definition into a working syntax statement, so please give me some comments in any suggested code, as a guide. Thanks