Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3222118
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:57:16+00:00 2026-05-17T15:57:16+00:00

I have created the database in Microsoft Access with this query SELECT * from

  • 0

I have created the database in Microsoft Access

with this query

 SELECT * from booking WHERE BOOK_DATE = DATE() order by book_time*

it returns 3 records which has BOOK_DATE = today date

but…

when i tried to place it in the Visual Basic with Data Control and DBGrid, i enter the query in the RecordSource property, but the data didnt come out when i execute the program

what did i miss about DATE()
doesn’t it support in vb, shall i replace it with something else?

WHERE BOOK_DATE = DATE()

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T15:57:16+00:00Added an answer on May 17, 2026 at 3:57 pm

    VB6 knows about DATE() as I have used it recently. I suspect that the data control can’t handle a built in function such as DATE() in the RecordSource. Can you change the RecordSource in the code, such as in the forms Open event or whatever approriate, to put in the date? Something like:

    Control.RecordSource="SELECT * from booking WHERE BOOK_DATE = " & _
         "#" &  DATE() & "# order by book_time* 
    

    Note that # are date delimiters similar to how ‘ or ” (quotes or double quotes) are delimiters. Assuming that the data control works the same as I’m used to in Access. Also note though that you sometimes don’t need those but you should be aware of them.

    Also if any systems are running anything but mm/dd/yy format, or if there’s even the slightest possibility this could happen then you should be ware of the following.

    SQL statements require that the dates be either completely unambiguous or in mm/dd/yy, or mm/dd/yyyy format. Otherwise Access/Jet will do it’s best to interpret the date with unknown results depending on the specific date it is working with. You can’t assume that the system you are working on is using those date formats. Thus you should use the logic at the following web page.
    Return Dates in US #mm/dd/yyyy# format
    http://www.mvps.org/access/datetime/date0005.htm

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to import an access database to mysql. I have created a
I have a regex created from a list in a database to match names
I have the following database table created thus: CREATE TABLE AUCTIONS ( ARTICLE_NO VARCHAR(20),
I have an Oracle database backup file (.dmp) that was created with expdp .
I have designed database tables (normalised, on an MS SQL server) and created a
I have a batch file that was created for an Oracle database that I'm
I have a requirement to create a simple database in Access to collect some
I've got two PostgreSQL databases that have been created using the same sql file.
So I have the following user defined type in my oracle database: CREATE OR
I am using NHibernate's SchemaExport to create my database schema. I have 1 legacy

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.