Results 1 to 10 of 10
  1. #1
    RoundTrip is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2014
    Posts
    28

    Forms and Date Range Criteria

    Hello all! I appreciate everyone's help already and sorry if I get a little confusing, I am just now starting Access. I have researched on a few sites of what I actually need, but it all seems futile as everything I try is not exactly what I need. Below I will post a few pictures of what I have now and, with the best possibly way explain what I need cause this is all confusing, I think if I ever get a few things figured out. Now this is a form I have thus far!


    Click image for larger version. 

Name:	helpme.png 
Views:	13 
Size:	173.1 KB 
ID:	15353
    Now, that is just a quick thing I threw together to get my questions across. Of course some things will not go in that form such as [Total Hours/Difference] and [Acres Per Hour] and etc, as things like that will be in another form/subform or repor tthat will display those things. Now what I need is a few reports/subforms/forms that I can open up whenever I get done entering information on the form I posted. I will have several buttons at the bottom of the form I can click to open either another form/subform/report displaying this information.

    1.) Form/report/whatever opened when button clicked at bottom of form above-
    First when opening the form I would like it to automatically ask you between what dates the records you want shown, then when that is entered it shows the records grouped by how many miles per day grouped by location and equipment

    2.) Form/report/whatever opened when button clicked at bottom of form above-
    First when opening the form I would like it to automatically ask you between what dates the records you want shown, then when that is entered it shows the records grouped by acres per day grouped by location, equipment and (a record that is not displayed in the area but it is called Operation)

    I have alot more calculations but i think if i can figured those thing things out i can do the rest by my self, I have tried the Lebans date picker and a few other things with different access verisons and other tutorials but i cant seem to get it, sorry guys if this is alot or confusing but the only way i knew how to explain it.

    One last thing on one more form that deals with something a little different,

    3.) Form/report/whatever opened when button clicked at bottom of form above-
    First when opening the form I would like it to automatically ask you between what dates the records you want shown, then when that is entered it shows the records grouped by a total of hours grouped by location, crop and equipment

    meaning it shows records in between certain dates entered and then equipment used, the crop it was used on, the location it was used at, and a total amount of hours it has been used if possible...if that makes sense :-/
    It seems very confusing im sorry really am, just im trying to get a hold of my farms and its not going so well

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Making users input value into a popup prompt and then passing that input into the form/report will require code. But why bother? Just present the textboxes on form for user to enter criteria. By the way, controls used for criteria input must be UNBOUND.

    Grouping does not take place on forms, that is a report feature. Records can be filtered on form, not grouped.

    This might be accomplished with one report that is grouped by location and equipment with aggregate calcs for average miles/acres/hours in group footer sections.

    Options for passing date range criteria to report:

    1. parameterized query that references the input controls on form

    2. VBA code to construct filter criteria and pass to the report
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    RoundTrip is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2014
    Posts
    28
    Sorry for the dumb struck reply but what your saying pretty much is, option one would be the easiest thing to do in my case and still give me the options I need?
    And what I am wanting is readily accessible and is possible correct? I asked someone that lives in my area (who they say they are good on databases) and they said they didnt think it was possible?

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    As I said, grouping not possible on form, but that's what report is for.

    Here is tutorial on parameterized query: http://www.datapigtechnologies.com/f...mtoreport.html
    It doesn't show filtering for a date range but the idea is the same, reference controls on form.

    I don't use dynamic parameterized queries. I use option 2.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I would add...

    I am not seeing any special questions or circumstances. To develop a DB that provides what you are asking will take some know how. Probably intermediate code writing skills.

    You need to start with getting the data input interface correct before you can create fancy reports and forms to view data.

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Other considerations:

    Avoid spaces and special characters/punctuation (underscore is exception) in naming convention. Also avoid reserved words as names (Date is a reserved word).

    You show labels for Starting Engine Hours/Miles and Ending Engine Hours/Miles. Hours and Miles should be in separate fields.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    RoundTrip is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2014
    Posts
    28
    Ok, I see well thankyou guys both for the help, the video is helping me alot thus far and as far as I can tell the question is solved at the moment, when I have futher questions I'll ask thanks a ton

  8. #8
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Absolutely ask more questions (maybe a new thread though)

  9. #9
    RoundTrip is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2014
    Posts
    28
    I will for sure make a new thread! But one last question referring to what June said earlier, you said that I should steer clear of reserved words like date, what should I name my field then that will not mess anything up?

  10. #10
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Whatever makes sense: DateEnter, DateWork, DatePlowed.

    Number is another reserved word.

    Not all reserved words will cause issue but best to avoid. When you create field name, Access should warn you if it is reserved.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 3
    Last Post: 09-11-2013, 09:49 AM
  2. Date Range Criteria help
    By jsubby3 in forum Access
    Replies: 7
    Last Post: 12-03-2012, 03:14 PM
  3. Replies: 7
    Last Post: 04-30-2012, 10:52 AM
  4. Replies: 1
    Last Post: 06-17-2011, 12:59 AM
  5. Criteria to show date range
    By Douglasrac in forum Queries
    Replies: 2
    Last Post: 03-24-2011, 03:58 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