Results 1 to 2 of 2
  1. #1
    shifty is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2015
    Posts
    5

    Cleaning up Queries

    So I just made this and was thinking it is kind of rough. What steps do you guys go about to make a cleaner query? I got lucky because there is only 1 class of IS358.01 but I am trying to get a foundation on what to look at in the future.



    SELECT COUNT(Student.[Student Name]) AS [Number of Students in IS353 And IS358]



    FROM Student



    WHERE (Class1 ) IN ("IS353.01","IS353.02") AND ((Class2 ) IN ("IS358.01") OR (Class3 ) IN ("IS358.01") OR (Class4 ) IN ("IS358.01") OR (Class5 ) IN ("IS358.01") OR (Class6 ) IN ("IS358.01"));

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    This is where Object Oriented Programming becomes very helpful. Rather than using "Magic Strings", where the value is hardcoded, use variables.

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

Similar Threads

  1. Cleaning up the Access UI and showing only form
    By accessmatt in forum Access
    Replies: 2
    Last Post: 10-27-2014, 12:36 PM
  2. Cleaning up a spreadsheet
    By tonydepo in forum Import/Export Data
    Replies: 16
    Last Post: 11-13-2012, 04:27 PM
  3. Cleaning up the alphabet
    By ducecoop in forum Access
    Replies: 4
    Last Post: 10-28-2010, 08:33 AM
  4. Cleaning Data
    By Sck in forum Queries
    Replies: 1
    Last Post: 07-22-2010, 12:43 AM
  5. Cleaning Up Data - Need Help
    By NeedHelp in forum Access
    Replies: 2
    Last Post: 06-05-2010, 10:06 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