I have a form to send items from one stock to another .
In this form i have 2 combo box named SendFrom and SendTo, one text box named Article, and a button named Command12. I want to when i click the button (command12) to have a new record , and to leave the SendFrom and the SendTo as they was before, for example if i was sending article1 from StockA to StockB when i click on the button to just set the focus on the Article to chose an article , but the destination from and to stay the same , till i change them ... how can i do that ??
I tried to write this but it's not working
can anyone know how to do this?? thanks for advance
In this form i have 2 combo box named SendFrom and SendTo, one text box named Article, and a button named Command12. I want to when i click the button (command12) to have a new record , and to leave the SendFrom and the SendTo as they was before, for example if i was sending article1 from StockA to StockB when i click on the button to just set the focus on the Article to chose an article , but the destination from and to stay the same , till i change them ... how can i do that ??
I tried to write this but it's not working
Code:
Private Sub Command12_Click() DoCmd.GoToRecord , , acNewRec Forms![Transfer]![SendTo] = Forms![Transfer]![SendTo].OldValue Forms![Transfer]![SendFrom] = Forms![Transfer]![SendFrom].OldValue Article.SetFocus End Sub
Comment