Results 1 to 4 of 4
  1. #1
    lccrews is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Aug 2017
    Location
    Los Angeles
    Posts
    194

    looking for a solution to update a table.

    God help me to explain this... I have a table with the following fields:
    bill description raw material claim overage input quantity uom batch size revision level

    I'd like my users to enter all but quantity and batch size field. I'd like a button to do 4 things:
    1. add the records
    2. fill series of current records with value in 'text1'
    3. calculate quantity with this expression: Quantity1: [Input]*[batch size]/1000
    4. refresh the form so the user sees the quantity field updated


    I'm considering a form with a qry-subform to enter the data.

    I am working on the query and I cannot get it to update. Am I doing this properly?: I bring all relevant fields in, add one field with the expression from item 3 above, and select update query. Every time I try to view the results I'm met with error: .... is not a valid name. Make sure that it does not include invalid characters or punctuation and that it is not too long.



    I'm not looking for a specific answer because this is a really complex idea. I'm just looking for brainstorming ideas. Thank you for your time and patience. I've attached my database if you want to look around at what I'm doing.
    Attached Files Attached Files

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    1. add how many records with what data?

    2. either loop through form RecordsetClone or run UPDATE sql

    3. calculate in query or textbox

    4. would require code to save calculated value to field but should not save this calculated value, calculate when needed
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    lccrews is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Aug 2017
    Location
    Los Angeles
    Posts
    194
    Hey June7,
    1. the user would input data by hand into a subform(update query?)
    2. I'll read up on update SQL. I don't know anything as of now.
    3. I tried using a query to do this calculation / update the record, but I'm met with an error every time.
    4. I want the calculated values to be saved to the table. This table will be used in a report.

    Thank you for the suggestion.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    1. bind form to table and inputs will save directly to table

    2. okay

    3. assuming form is bound to table, expression in textbox ControlSource would be: =[Input]*[batch size]/1000, record first has to be committed to table before could run a UPDATE sql action

    4. as stated, requires code (macro or VBA behind form) to save calculated value to field, calculation can be done in query used as report RecordSource
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Append or Update Query Solution
    By zbaker in forum Queries
    Replies: 9
    Last Post: 01-07-2015, 02:20 PM
  2. Replies: 7
    Last Post: 09-21-2012, 11:09 AM
  3. Replies: 1
    Last Post: 02-08-2012, 04:50 PM
  4. Replies: 3
    Last Post: 07-01-2011, 12:06 PM
  5. Replies: 1
    Last Post: 01-22-2011, 12:23 PM

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