Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Z1nkstar's Avatar
    Z1nkstar is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Location
    TX, USA
    Posts
    145

    Save/Continue Is what I want???

    When my sales team is entering orders into access I have this as their input screen---->
    Click image for larger version. 

Name:	2.JPG 
Views:	16 
Size:	123.0 KB 
ID:	16897
    What I would Like I already have a Save/Close and an Undo/Exit I was wondering If I could do a Save/Continue so that the customer name, sales order, Customer P.O. , Ship To Where so that all they have to change when adding another Line Item from the same Sales Order is the item and the amount ordered (they are getting really lazy on me) so anything you can do to help me Thanks!!!
    Click image for larger version. 

Name:	1.jpg 
Views:	16 
Size:	184.6 KB 
ID:	16898
    Attached Thumbnails Attached Thumbnails 2.JPG  

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,529
    Looks like a bound form, so you can put the desired values into variables, use GoToRecord to go to a new record, then populate the appropriate controls from the variables.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Z1nkstar's Avatar
    Z1nkstar is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Location
    TX, USA
    Posts
    145
    I don't think I am completely following you Is that an answer or a statement?

  4. #4
    Z1nkstar's Avatar
    Z1nkstar is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Location
    TX, USA
    Posts
    145
    What I would Like I already have a Save/Close and an Undo/Exit I was wondering If I could do a Save/Continue so that the customer name, sales order, Customer P.O. , Ship To Where so that all they have to change when adding another Line Item from the same Sales Order is the item and the amount ordered (they are getting really lazy on me) so anything you can do to help me Thanks!!!

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,529
    That was a statement that answered the question. Pseudo code behind button

    Dim strCust as String

    strCust = Me.Customer
    DoCmd.GoToRecord...(insert appropriate arguments)
    Me.Customer = strCust
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,529
    By the way, they are not lazy so much as they feel the computer can do more of the work. I've always thought that my job is to make other people's jobs easier. This is a perfect example of that. Them retyping the info is both a waste of time and an opportunity for errors.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    Z1nkstar's Avatar
    Z1nkstar is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Location
    TX, USA
    Posts
    145
    So am I supposed to insert the fields that I want to keep into () or what and
    I was just being funny sales team laughed at your response ha

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,529
    No, the other fields would be additional lines before and after that one. If you look at help on GoToRecord, you'll see the arguments necessary to make the form go to a new record.

    Go sales team!! Without you none of us has a job!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #9
    Z1nkstar's Avatar
    Z1nkstar is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Location
    TX, USA
    Posts
    145
    So the fields I want to keep would be this ???
    1.Customer
    2.CustomerPurchaseOrder
    3.ShipTo
    4.SalesOrder
    The Expression given was for Customer???

    strCust = Me.Customer
    DoCmd.GoToRecord...(insert appropriate arguments)
    Me.Customer = strCust


    I would do separate expressions for each???

  10. #10
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,529
    Like I said, you would add lines before and after the GoToRecord:

    set variable 1
    set variable 2
    set variable 3
    set variable 4
    go to new reocrd
    use variable 1
    use variable 2
    use variable 3
    use variable 4
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  11. #11
    Z1nkstar's Avatar
    Z1nkstar is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Location
    TX, USA
    Posts
    145
    So Like this

    Dim strCust as String
    set variable 1 = Customer
    set variable 2 = Sales Order
    set variable 3 = CustomerPurchaseOrder
    set variable 4 = ShipTo
    strCust = Me.Customer
    DoCmd.GoToRecord...(insert appropriate arguments)
    Me.Customer = strCust
    (I cant find the Help for GoToRecord Cmd)
    use variable 1 = Customer
    use variable 2 = Sales Order
    use variable 3 = CustomerPurchaseOrder
    use variable 4 = ShipTo

  12. #12
    Z1nkstar's Avatar
    Z1nkstar is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Location
    TX, USA
    Posts
    145
    Okay I am just stomped on this one I cant get the code to work I am trying to keep 4 fields thats it. Can you write the code out or give me a better explanation of your answer?

  13. #13
    Z1nkstar's Avatar
    Z1nkstar is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Location
    TX, USA
    Posts
    145
    I have this in another button on another form that wasn't created by me but is this what you mean?


    'Set Variables
    Dim MyDateEntered As Date
    Dim MyItem As String
    Dim MyQuantityOrdered As Integer
    Dim MyCustomer As String
    Dim MySalesOrder As String
    Dim MyShipTo As String
    Dim MyStatus As String
    Dim MyOldBuildID As String
    Dim MyCustomerPurchaseOrder As String



    'Copy fields to variables
    MyDateEntered = Me.DateEntered
    MyItem = Me.Item
    MyQuantityOrdered = Me.QuantityRemaining
    MyCustomer = Me.Customer
    MySalesOrder = Me.SalesOrder
    MyShipTo = Me.ShipTo
    MyOldBuildID = Me.BuildID
    MyCustomerPurchaseOrder = Me.CustomerPurchaseOrder



    'Go to a new record
    DoCmd.GoToRecord , , acNewRec


    'Reverse the process and plug old values into new record
    Me.DateEntered = MyDateEntered
    Me.Item = MyItem
    Me.QuantityOrdered = MyQuantityOrdered
    Me.Customer = MyCustomer
    Me.SalesOrder = MySalesOrder
    Me.ShipTo = MyShipTo
    Me.Status = "2"
    Me.BackOrderedFrom = MyOldBuildID
    Me.CustomerPurchaseOrder = MyCustomerPurchaseOrder
    Me.IsBackOrder = True

  14. #14
    Z1nkstar's Avatar
    Z1nkstar is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Location
    TX, USA
    Posts
    145
    'Set Variables
    Dim MyDateEntered As Date
    Dim MyCustomer As String
    Dim MySalesOrder As String
    Dim MyShipTo As String
    Dim MyStatus As String
    Dim MyCustomerPurchaseOrder As String

    'Copy fields to variables
    MyDateEntered = Me.DateEntered
    MyCustomer = Me.Customer
    MySalesOrder = Me.SalesOrder
    MyShipTo = Me.ShipTo
    MyCustomerPurchaseOrder = Me.CustomerPurchaseOrder

    'Go to a new Record
    DoCmd.GoToRecord , , acNewRec

    'Reverse the process and plug Values into New Record
    Me.DateEntered = MyDateEntered
    Me.Item = MyItem
    Me.Customer = MyCustomer
    Me.SalesOrder = MySalesOrder
    Me.ShipTo = MyShipTo
    Me.CustomerPurchaseOrder = MyCustomerPurchaseOrder






    THIS WORKS SO NOW ITS FIXED THANKS!!!!!!!!!!

  15. #15
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,529
    That's what I meant. Glad you got it sorted out.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 9
    Last Post: 03-14-2014, 01:28 PM
  2. Replies: 5
    Last Post: 02-03-2014, 03:06 AM
  3. Replies: 15
    Last Post: 01-28-2014, 12:20 PM
  4. Replies: 5
    Last Post: 08-10-2010, 02:57 PM
  5. Replies: 5
    Last Post: 07-13-2010, 11:48 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums