Results 1 to 8 of 8
  1. #1
    Raj Padhiar is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2020
    Posts
    4

    Post Recording field value to a table

    I currently have afield value in a form derived from a query which i need to record into the specified table.
    How do I do it?


    I have tried using a macro and the action Setvalue without any luck.

  2. #2
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2016
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    We need to see more info.
    What table? What field(actually a control on a form)?
    The SQL of the query.
    Few use macros, so you may get responses in vba or other.

  3. #3
    Raj Padhiar is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2020
    Posts
    4
    I have a subform that extracts the value of a Price and Description fields from a table "Products" with the Part Number as primary key.
    The subform has a table "Lines" as the data source. I am trying to record the value of Price in the "Lines" table.
    The value of Price is liable to change in future which can not change once entered.
    So, I am trying to get the value [Products]![Price] = [Lines]![Price]

  4. #4
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,557
    Hi Raj

    Can you upload a zipped copy of the database?
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  5. #5
    Raj Padhiar is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2020
    Posts
    4
    I have following SQL in a subform for creating an invoice:-
    SELECT [Order Lines].LineID, [Order Lines].[Part Number], Stock.Description, [Order Lines].Qty, Stock.ListPrice, [Order Lines].[Qty]*
    [ListPrice] AS [Line total], ([Qty]*
    [ListPrice])*0.2 AS Vat, ([Qty]*
    [ListPrice])*1.2 AS [Total Due], [Order Lines].CustID, [Order Lines].InvID
    FROM [Invoice totals] INNER JOIN (Stock INNER JOIN [Order Lines] ON Stock.[PartNumber] = [Order Lines].[Part Number]) ON [Invoice totals].InvID = [Order Lines].InvID;
    I am trying to record the value of the field Stock.ListPrice on the file [Order Lines]with a field labelled [Price].



    [

  6. #6
    Raj Padhiar is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2020
    Posts
    4
    Hi mike60smart,
    I am still in the process of building up the database and its not yet ready for publishing. Sorry

  7. #7
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2016
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Raj,

    Difficult to understand your setup without a sample database.
    Prices change all the time, and you may sell items in a clearance or other sale, or offer some sort of loyalty program. See this link for an approach to storing Price.
    Good luck.
    Last edited by orange; 10-16-2020 at 05:27 AM. Reason: spelling

  8. #8
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I would advise you save yourself some grief and remove any and all spaces in object names (fields, tables, queries, forms and reports are objects)

    So [Order Lines].LineID, [Order Lines].[Part Number] would become

    [OrderLines].LineID, [OrderLines].[PartNumber]

    or

    [Order_Lines].LineID, [Order_Lines].[Part_Number]


    Personally, I use camel case (OrderLines -> the first letter of each word is a capital letter)

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

Similar Threads

  1. Replies: 5
    Last Post: 06-25-2020, 08:42 PM
  2. Replies: 7
    Last Post: 09-02-2014, 08:18 AM
  3. Recording your own Macro
    By sabre1 in forum Access
    Replies: 1
    Last Post: 03-02-2011, 06:43 AM
  4. Recording Username
    By Juan4412 in forum Forms
    Replies: 9
    Last Post: 02-01-2011, 11:15 PM
  5. time recording
    By Back2Basics in forum Access
    Replies: 3
    Last Post: 02-02-2010, 08:39 AM

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