Results 1 to 4 of 4
  1. #1
    dada is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    40

    need help with this simple query

    i have this code:

    SELECT [Transaction].[TransactionID], [Transaction].[EmployeeID], [Transaction].[TimeIn], [Transaction].[TimeOut] FROM [Transaction] WHERE ((([Transaction].[Barcode])=[Forms]![DTR]![TxtCode]));



    i just want to add more filter like, Select ..... Where [Transaction].[Barcode]= .... AND [Transaction].[Date]=..));

    i just want to add the "AND Transaction.Date to the above code to add more filter to the result, i just don't know how and where to add. Please help.. thanks!

  2. #2
    maximus's Avatar
    maximus is offline Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Aug 2009
    Location
    India
    Posts
    931
    well if you want to type the SQL Syntax Directly in the SQL window don't worry about the ( on the Where, just typing out the sytax properly and then save it, the brackets are added automatically by access.

    You don't need to put them when you are using SQL in VBA.



    SELECT [Transaction].[TransactionID], [Transaction].[EmployeeID], [Transaction].[TimeIn], [Transaction].[TimeOut] FROM [Transaction] WHERE [Transaction].[Barcode])=[Forms]![DTR]![TxtCode] And [Tansaction].[Date]=#02/01/2010#;

  3. #3
    dada is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    40
    thanks! awesome!

  4. #4
    maximus's Avatar
    maximus is offline Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Aug 2009
    Location
    India
    Posts
    931
    mark this thread solved please

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

Similar Threads

  1. Simple query problem
    By rajnag in forum Access
    Replies: 4
    Last Post: 08-19-2010, 05:09 AM
  2. Simple query Question, please Help
    By iamraja5 in forum Forms
    Replies: 1
    Last Post: 03-16-2010, 05:04 AM
  3. simple query
    By taylorosso in forum Queries
    Replies: 1
    Last Post: 10-06-2009, 04:26 AM
  4. Need Help with a very simple query
    By bikerguy06 in forum Queries
    Replies: 3
    Last Post: 06-08-2009, 08:43 PM
  5. Help with a simple query
    By JohnnyO in forum Queries
    Replies: 1
    Last Post: 02-11-2009, 09:43 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