How to keep the value of combo box from a record to a new one ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hannoudw
    New Member
    • Aug 2010
    • 115

    How to keep the value of combo box from a record to a new one ?

    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
    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
    can anyone know how to do this?? thanks for advance
  • nico5038
    Recognized Expert Specialist
    • Nov 2006
    • 3080

    #2
    Not sure why you want to send stock from A to B.
    The general approach is to have a stock field and change the value from A to B to handle a move.

    Nic;o)

    Comment

    Working...