Results 1 to 9 of 9
  1. #1
    Alphix is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2014
    Posts
    61

    INSERT INTO code not working properly.

    I am not able to fix my INSERT INTO Code to input my data into my table.

    The times seem to enter properly but the results and the text does not enter at all.

    Before clicking the insert into button:

    Event2 = Machine Fault
    Event3 = No Parts
    Event4 = Bathroom Break


    Event5 = Lunch
    Event6 = Meeting
    Event7 = End of Shift

    Please Help.... Error 128 fail pops up.
    INSERT INTO SAMPLE.zip

    Thanks




    Also, I tried to use F8 to debug and step line by line. (This seems to not work).

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    Dont use SQL code. Use a query.
    Are you using a query?

  3. #3
    Alphix is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2014
    Posts
    61
    I would like to input the initial data into a table.
    This is replacing a paper document in which several hundreds of employees are using.

    After the initial data is collected then I will use dynamic queries for the various users.

    Is it possible to enter this data into a table?

  4. #4
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    Tables are where you store the data.
    Queries add , subtract , modify data. They are the VERBs of a database.
    Use an append query to add data.

  5. #5
    Alphix is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2014
    Posts
    61
    Now I am really stumped....I am still an infant in creating a database. I hear what you are saying but I am do not have any ideas on how to approach it that way.

    How can data from different users at different areas and different events be pulled out if I only have time stamps in my tables?

    at the very end of my project I would like to do queries on for example:

    (1) How machines failed for a particular event?
    (2) What was the down time for Machine A on January 2014?
    (3) I would like to have charting capability.

    That is the reason I thought to collect all my data in a table first.

    Now it seems like I am back to square 1 on how to collect the data.

    I need some help....

  6. #6
    Alphix is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2014
    Posts
    61
    Do you think if I should categorize the data into different tables then at that point I can create query relationships?

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,621
    Elapsed time and total elapsed time should be calculated in a query, not stored in table.

    Summing these 7 elapsed times will require an expression like: Nz(Elapsed1) + ... + Nz(Elapsed7)

    There is only 1 table. What relationships do you want to build? The data structure is not normalized. As is can have only 7 start/stop pairs - what if you need 8 or more - what if you seldom need more than 4? A normalized structure would be like:

    tblMachines
    ID (primary key)
    MachineName

    tlbUsers
    ID (primary key)
    LastName
    FirstName

    tblMachineEvents
    MachineID (foreign key)
    UserID (foreign key)
    DateTimeStart
    DateTimeEnd
    EventCode
    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.

  8. #8
    Alphix is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2014
    Posts
    61
    Thank you for your thoughts on this. I will have to re-think this.

    My query will have to calculate up time and down time from machine "A", "B" and "C".
    My query will have to let me know all the machines particular users used.
    My query will have to chart out efficiencies of machine and users.

    Thanks again for everyone's suggestions, I appreciate the help.

  9. #9
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,621
    The down time calc will be more complicated with normalized structure.

    Not sure about efficiencies.

    Will it be the same user for all 7 Start/Stop?

    It is a balancing act between normalization and ease of data entry/output. Maybe you should stick with non-normalized structure, however, still say saving the calculated data should not be necessary.

    Keep in mind that tables and queries are limited to 255 fields.
    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. Selection Query not working properly
    By zipaway in forum Queries
    Replies: 9
    Last Post: 07-31-2014, 06:56 AM
  2. Conditional Formatting not working properly
    By GraeagleBill in forum Reports
    Replies: 3
    Last Post: 03-08-2014, 07:21 PM
  3. Checkboxes not working properly
    By TK03 in forum Access
    Replies: 1
    Last Post: 12-24-2012, 09:04 AM
  4. Count or DCount Not Working Properly
    By Chris1112 in forum Forms
    Replies: 3
    Last Post: 05-09-2012, 02:51 PM
  5. Msgbox And Search Code Not Working Properly
    By vampyr07au in forum Forms
    Replies: 1
    Last Post: 05-02-2011, 05:16 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