Results 1 to 8 of 8
  1. #1
    carstenhdk is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    May 2010
    Location
    Denmark
    Posts
    42

    Question Make a messagebox

    Hi




    When I open a quiry, I would like to get a msg box with the following:


    Do you want to find the entries by: Starting date (date feild), Teamnumber (nummeric feild)?

    Then the quiry makes a list of the found entries.

    Is it possible to make a combobox for the starting date? I have about 30 students starting every week, so in 30 entries the date will be the same. Make some kind of dropdown-list of the known starting dates, without listing them all. The list will not have to go further back than a month or so.


    //Carsten

  2. #2
    Datagopherdan is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Dec 2008
    Posts
    220
    You can create a query and group by that date field, so only unique dates would show up. If it's dates though, you might be better off going with 2 unbound text fields to allow the user to enter a date range.

  3. #3
    Rawb is offline Expert
    Windows XP Access 2000
    Join Date
    Dec 2009
    Location
    Somewhere
    Posts
    875
    Quote Originally Posted by carstenhdk View Post
    Hi


    When I open a quiry, I would like to get a msg box with the following:


    Do you want to find the entries by: Starting date (date feild), Teamnumber (nummeric feild)?

    Then the quiry makes a list of the found entries.

    Is it possible to make a combobox for the starting date? I have about 30 students starting every week, so in 30 entries the date will be the same. Make some kind of dropdown-list of the known starting dates, without listing them all. The list will not have to go further back than a month or so.


    //Carsten
    It sounds like you want a Form. you can set it up with a dropdown list of available dates and a field that allows you to select the order. You can also set up a Report based on your Query that allows you to format the data so that it looks/reads better than the Query.

    Then, you just open the Form instead of the Query, select your criteria, and click a button to view a Report with what you want.

  4. #4
    maximus's Avatar
    maximus is offline Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Aug 2009
    Location
    India
    Posts
    931
    the fact is that if you do a drop down combo of the available dates with the conditions given that within one month then I would like to suggest use the table that has the Starting Date and create a query with a calculative field. Then set the criteria of this Field to <=1.

    MonthDiff: DateDiff("m",[S_Date],Date())

    Sql Syntax

    SELECT DISTINCT [Table1].[S_Name], [Table1].[S_Date], DateDiff("m",[S_Date],Date()) AS hh
    FROM Table1
    WHERE (((DateDiff("m",[S_Date],Date()))<=1));

    adding SELECT DISTINCT ensures that the same name is not repeated over again. Now the Combobox with the Query as the RowSource will display all dates one month before today, More over it will ensure that the records are displayed Distinct with no repeats.

    I think the requirement here is filtering records for a particular date rather than a date range.

  5. #5
    carstenhdk is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    May 2010
    Location
    Denmark
    Posts
    42
    Quote Originally Posted by maximus View Post


    MonthDiff: DateDiff("m",[S_Date],Date())



    Where is this gonna be placed??

  6. #6
    maximus's Avatar
    maximus is offline Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Aug 2009
    Location
    India
    Posts
    931
    has to be placed in a query. you have to create a calculative field. don't work I send you a sample. if you can't do it.

  7. #7
    carstenhdk is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    May 2010
    Location
    Denmark
    Posts
    42
    Quote Originally Posted by maximus View Post
    has to be placed in a query. you have to create a calculative field. don't work I send you a sample. if you can't do it.

    I need some help for that. :-S

  8. #8
    maximus's Avatar
    maximus is offline Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Aug 2009
    Location
    India
    Posts
    931
    Well I am attaching a sample for you. The question to which I had given a solution is how can you have distinct dates in a combo box. I am attaching a small sample for you hope this will help you.

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

Similar Threads

  1. Make new entry at once
    By carstenhdk in forum Forms
    Replies: 1
    Last Post: 05-12-2010, 05:36 AM
  2. Cannot make ACCDE
    By DanW in forum Database Design
    Replies: 1
    Last Post: 12-10-2009, 08:20 PM
  3. Make ACCDE problem
    By Eric1066 in forum Access
    Replies: 3
    Last Post: 11-27-2009, 04:33 PM
  4. How to make form
    By krishna79 in forum Forms
    Replies: 1
    Last Post: 02-11-2009, 10:32 PM
  5. How to make an autorefreshing?
    By Estyl in forum Access
    Replies: 2
    Last Post: 02-19-2008, 08:29 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