Results 1 to 9 of 9
  1. #1
    big-div is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2012
    Posts
    6

    Opening a filtered form based on a selected date

    Hi All,



    Just trying to build a database that manages bookings and customers.

    I have a form that is opened by clicking the "New Booking" Button on a datasheet next to the name.
    Click image for larger version. 

Name:	Untitled-1.jpg 
Views:	4 
Size:	67.1 KB 
ID:	7850

    which opens this form:
    Click image for larger version. 

Name:	Untitled-2.jpg 
Views:	5 
Size:	35.4 KB 
ID:	7851

    Now what I want to be able to do, is select a date using the date picker on the first field there, "Rental_date" then click the Open form button, (which should be "Check date" or something..) which would take me to a form that lists either all the records of bookings on that date or display a message saying " No bookings on this date ! " . I've tried the built in function using the macro code, but that does not do anything, all i get is a blank datasheet !


    The weird thing is, if i add the same button again using the wizard to open a form based on a value using the Contact name field to open up the customer details form, it works !! So I think it may be something to do with the dates ?

    Not sure guys, ive only done very basic things with access before :|


    Cheers !!

  2. #2
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    See if the information on this page helps you:
    http://www.baldyweb.com/wherecondition.htm

  3. #3
    big-div is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2012
    Posts
    6
    Hi mate, seems i have a problem of formatting, if i use the date in format dd/mm/yyyy and try to search, it returns no records, but if i search in the format mm/dd/yyyy it works ! even though the records in the database are clearly showing the format of dd/mm/yyyy !? Any ideas my friend ?

  4. #4
    big-div is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2012
    Posts
    6
    I think it may have something to do with the system time ?? I just tried it on another pc and I noticed the date format is mm/dd/yyyy for system time, surely this shouldn't be the case ?

  5. #5
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    mm/dd/yyyy is the common date format in the US . . . but not in other countries.
    Are you in the US?
    Regardless, can you live with mm/dd/yyyy in your searches . . . and, if you need to, display your dates dd/mm/yyyy [using formatting]?

  6. #6
    big-div is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2012
    Posts
    6
    Yeah, which is what i find really weird, because im in Australia !?

    How would I go about formatting ? Cheers

  7. #7
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    The Format that I am talking about would only serve the purpose of displaying your dates in a particular format.
    Look at the info on this page and see if it helps.
    http://www.techonthenet.com/access/f...ate/format.php

    I'm not sure why your dates are coming out different.
    I'm not sure if it has something to do with your computer - or if there is a setting in Access that you can go into and specify how you want your dates to appear.
    There are a few users on here who probably can help - look for pbaldy . . . and June7 . . . and RuralGuy. You can right click on their user names and ask a private question.

  8. #8
    big-div is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2012
    Posts
    6
    Thanks mate, I will sus that all out. Also another problem im having, its apparently common, but Its annoying as all hell ! The Return with out gosub error ! How do you stop this from happening ???

  9. #9
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    Can you post a screenshot of that error?
    Just going by what you say
    Return without gosub
    I am inclined to think that it may be something minor to do with your code.

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

Similar Threads

  1. Replies: 15
    Last Post: 04-17-2012, 01:42 PM
  2. Report based of filtered data from a form
    By Fabdav in forum Reports
    Replies: 1
    Last Post: 09-15-2011, 05:28 AM
  3. Replies: 2
    Last Post: 01-15-2011, 10:56 AM
  4. Replies: 5
    Last Post: 01-02-2011, 10:09 AM
  5. Cancel opening a form based on information
    By eww in forum Programming
    Replies: 1
    Last Post: 10-19-2010, 01:24 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