Results 1 to 4 of 4
  1. #1
    NikoTheBowHunter is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2017
    Posts
    58

    New record with validation help needed

    How would one go about making the following happen:

    Creating a form that has a single column of cells/text boxes that allows 20-100 barcodes to be scanned into said boxes/cells. Then when the "ADD NEW STOCK" button is pressed, the system first checks to see if the device number is already in the system, if not it adds the new record. Once the system is done checking and adding records, it updates to the right with the result of each. For example the form would kind of look like:



    -------------------------------------------
    Scan device numbers below:

    [ ] << list of empty text boxes/excel/some kind of list format, blank until number is scanned in
    [ ]
    etc.

    ((ADD NEW STOCK BUTTON))

    -------------------------------------------

    Once the numbers were added and the add new stock button pressed, system checks for duplicates, adds new records and displays the results to to the right.

    -------------------------------------------
    Scan device numbers below:

    [ XXXX ] *new record added*
    [ XX44 ] *DUPLICATE RECORD FOUND, DEVICE NOT ADDED*
    etc.

    ((ADD NEW STOCK BUTTON))

    -------------------------------------------


    One last thing, when a new record is added, i want the system to also set the Status field to MC Stock, Region and UnitNumber fields to MC. My table name is tblInv, its just the one table database.

    seriously a big thank you in advance for anyone who can help me out or get me pointed in the right direction. I have little to no access or coding experience so any help is appreciated. cheers.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    You'd run some queries,
    Q1, join the entry table to the data table on ID.
    update the Entry table with EXISTS, (because they match)

    Q2 ,same joins, but make it an OUTER join to show missing records in Data table,
    mark tEntry fields as ADDED NEW

    Q3, like Q2, except you add recs to data table.

  3. #3
    NikoTheBowHunter is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2017
    Posts
    58
    honestly that all went over my head, but with some more reteach i came across the option of setting the ID field's Indexed property to Yes (No duplicates). So this should prevent duplicates from being entered.

    so now i have one form set up that has a single text box for entering the device number and the SUBMIT button.

    Which is the best route to go so i can edit my form to allow multiple numbers to be entered at the same time?

  4. #4
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    You don't. Each entry should be stored on the table as a new record. Once entered (AfterUpdate) the validation and append will happen and a new empty record shown to the user ready for the next entry to be made.

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

Similar Threads

  1. Validation Help Needed
    By msmit8 in forum Access
    Replies: 7
    Last Post: 12-01-2014, 07:41 PM
  2. Need help with record validation
    By Jasonmayak in forum Access
    Replies: 15
    Last Post: 08-01-2014, 04:04 PM
  3. Record-Level Validation in Tables
    By Merf in forum Access
    Replies: 1
    Last Post: 07-16-2013, 02:00 PM
  4. Record Submit Validation Rule in Form
    By agent- in forum Programming
    Replies: 7
    Last Post: 05-24-2011, 04:03 PM
  5. Replies: 1
    Last Post: 03-09-2009, 12:46 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