Results 1 to 4 of 4
  1. #1
    AccessNewb1 is offline Novice
    Windows 10 Office 365
    Join Date
    Sep 2021
    Posts
    2

    Question restrict text entry if text doesn't match field

    As the name implies total newb with Access, I have a form with a text box entry that writes a SerialNumber to a Transaction table. I want to restrict the end user from writing data to the transaction table if the SerialNumber entered isn't an exact match with the SerialNumber in the Products table. Please help as I only started to use Access 2 weeks ago

  2. #2
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,158
    Use a combo box that lists only valid serial numbers as the text entry point.
    Use the wizard to help you set it up.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  3. #3
    AccessNewb1 is offline Novice
    Windows 10 Office 365
    Join Date
    Sep 2021
    Posts
    2
    I guess I should have noted that the text entry is read from a barcode using a handheld scanner. I am trying to avoid manual data entry by using barcodes.

  4. #4
    kd2017 is offline Well, I tried at least.
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    1,165
    Set up referential integrity between the two tables and access won't allow updates to your transaction table if the corresponding serial number doesn't exist in the product table. Google search 'ms access referential integrity'

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

Similar Threads

  1. Replies: 1
    Last Post: 07-17-2019, 02:14 PM
  2. Text Box Properties restrict to 255 characters
    By Ruegen in forum Programming
    Replies: 7
    Last Post: 11-18-2014, 05:03 AM
  3. capitalize text on field entry in form
    By tweety in forum Forms
    Replies: 3
    Last Post: 02-14-2013, 09:19 AM
  4. Replies: 3
    Last Post: 10-13-2011, 04:42 PM
  5. Form input field color changes to match text
    By fordtough in forum Forms
    Replies: 0
    Last Post: 05-06-2011, 09:49 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