Results 1 to 2 of 2
  1. #1
    Stephanie53 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    246

    Needed to add a Field and Remove a Field

    know I know..you saw who is posting and think..SHE's Baccckkkk!! lol and here i was doing so good too!



    Here is the Issue:

    In the Order Subform for Order Details I needed to remove one field and insert another - -

    The Field I need is Product Code under the Products table to which added from the recordsource on the Ordersubform for Order Details to get it from Products
    the one field i did not need was "Unit Price" so i removed it.

    Now the field i do want to have in there is called Product Code.. The fields should be in the order of the following:

    Product ID
    Product Code
    Oty
    List Price
    Status ID

    It used to be the following

    Product ID
    Qty
    Unit Price
    Discount
    Status ID

    With previous posts I was able to figure out and change from "Discount" to List Price and have it get the correct info into that field..that isnt the issue..here is the issue...
    Now i am getting this debug error..

    Code:
    Private Sub Product_ID_AfterUpdate()
        'Initialize price and discount for each product change
        If Not IsNull(Me![Product ID]) Then
            Me![Quantity] = 0
            Me.Quantity.Locked = False
            Me![Unit Price] = 0
            Me!
    [List Price] = DLookup(IIf(Forms![Order Details]!TypeID = 1, "
    [List Price A] ", "
    [List Price B]"), "Products", "ID=" & Me.Product_ID)
            Me![Status ID] = None_OrderItemStatus
            
            
        'Empty Product records mean user wants to delete line item
        Else
            eh.TryToRunCommand acCmdDeleteRecord
        End If
    End Sub
    Click image for larger version. 

Name:	Runtime Error.jpg 
Views:	13 
Size:	23.1 KB 
ID:	12352

    So I removed Me![Unit Price] = 0 and then all the rest started turning yellow too! It not allowing me to add the new field in to which by the way its in the wrong column in the form too from where its at in the table/query to which i keep trying to change the tab source to get the column in the correct format too...but other than that please tell me what i am doing wrong

    TIA

    Stephanie

  2. #2
    Stephanie53 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    246
    fixed this issue now on to the next...

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 11
    Last Post: 04-22-2013, 06:13 AM
  2. Replies: 5
    Last Post: 06-28-2012, 10:49 AM
  3. Remove lines from Memo field
    By bvallez in forum Programming
    Replies: 5
    Last Post: 08-08-2011, 06:40 PM
  4. Replies: 5
    Last Post: 03-10-2011, 02:19 PM
  5. Remove contents from each field
    By nancyszn in forum Access
    Replies: 7
    Last Post: 08-06-2009, 03:41 PM

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