Results 1 to 4 of 4
  1. #1
    Oblivion_Creed is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Apr 2017
    Posts
    20

    Catching user bad input in query

    Im working on a small library project in which i have an input that takes user ID and the book he want to take.Now books has ages for reading and some young user cant take certain books. now i want to raise an error to the user every time he try to take a book that not for his age and that he will be able to correct his input.How can i do that?

  2. #2
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 10 Access 2016
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,536
    Tell us what your tables look like.

  3. #3
    Oblivion_Creed is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Apr 2017
    Posts
    20
    Quote Originally Posted by alansidman View Post
    Tell us what your tables look like.
    Click image for larger version. 

Name:	return table.jpg 
Views:	15 
Size:	139.4 KB 
ID:	30813
    Click image for larger version. 

Name:	Untitled.jpg 
Views:	15 
Size:	124.8 KB 
ID:	30814

    as you can see i have here two query's: One that add information to a table and the other that delete information from the old table.
    i want to combine those two in to one query that add and then delete information.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,644
    Instead of catching an error, set the combobox RowSource SQL to only offer books appropriate to the student age. However, conditional combobox with lookup alias will not work nice in continuous or datasheet form. Review this recent thread on same topic https://www.accessforums.net/showthread.php?t=67549
    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. Replies: 1
    Last Post: 11-04-2014, 12:07 PM
  2. Prompting for user input in query
    By sherrygroves in forum Access
    Replies: 7
    Last Post: 08-31-2014, 09:32 PM
  3. Replies: 2
    Last Post: 07-08-2014, 10:03 AM
  4. Replies: 0
    Last Post: 03-22-2010, 07:51 PM
  5. User Input Query
    By ManC in forum Queries
    Replies: 2
    Last Post: 03-04-2010, 07:09 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