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

    Not able to add records INSERT INTO multiple data into TABLE & Table does not advance.


    Views: 10 Size: 208.6 KB">Bendix-EVENT COLLECTOR_REV5.zip


    Not able to add records to table using the INSERT INTO function and Auto Number does not go to 3, 4, etc.

    I would like to add a page of data at once on one row in Table.


    Please help.

    I have attached a snippet of the file.

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    The SQL statement needs actual delimited values in the "VALUE" clause concatenated to the string..
    Code:
    "VALUES(#" & Date() & "#, " & .......)"
    This example is incomplete because I never use tempvars. But you should get the idea.


    However, the form is bound to the table. The entries will be automatically be saved if you move off of the current record. Why are you trying to use a SQL statement to save the data?

    Your table is not normalized. You will have problems (and probably tear out your hair) with the current table structure...



    BTW, I would use the SELECT CASE.... END SELECT construct instead of the multiple IF() statements.
    There is a START button, but no STOP button. Again, I don't use tempvars, so I am not sure what you are trying to do.

  3. #3
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,016
    Quote Originally Posted by ssanfu View Post
    ...Your table is not normalized. You will have problems (and probably tear out your hair) with the current table structure...
    Absolutely! You're committing what many call 'Spreadsheet by Database!' You should have a Main Form, based on a Table with the a RecordID (as the Primary Key,) operator's name, date and machine number, then a Subform based on a second Table having a RecordID (as a Foreign Key,) UpTimesStart, UpTimesStop, DownTimesStart, DownTimesStop and EventCode.

    The the Tables would be related via the RecordID, and there would be a separate Record, in the Subform, for each event.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  4. #4
    Alphix is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2014
    Posts
    61
    Thanks for pointing me in a better direction. I am still inexperienced in building a database.

    I have some questions:

    By creating this Form to have 2 tables (One Main and Other Subform)
    Multiple users will be entering data at the same time.

    1. Will I be able to create a query grab selected users and view there total down time and up time?
    2. Does the Foreign Key connect to the correct User without mixing up the elapsed time data?
    3. How does the 2 tables keep everything organized from all the various user data?

    Thanks.

    1.

  5. #5
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    To add to what Steve and Linq have said--- get your tables and relationships set up before dealing with forms.
    See and work through this tutorial to gain experience. Then use what you learn to build/refine your database.

    Good luck with your project.

  6. #6
    Alphix is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2014
    Posts
    61
    Thank you.

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

Similar Threads

  1. Replies: 25
    Last Post: 01-29-2013, 08:49 AM
  2. Replies: 2
    Last Post: 12-20-2011, 07:33 AM
  3. Replies: 2
    Last Post: 05-03-2011, 01:02 AM
  4. Replies: 1
    Last Post: 12-28-2010, 11:24 AM
  5. Replies: 0
    Last Post: 02-24-2010, 12:56 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