Results 1 to 6 of 6
  1. #1
    qunniq is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2012
    Posts
    3

    Small Issues with Allen CASU-08 Closing Modals and date ranges on reports

    Hi all. I'm fairly new to access and most of what i've done was butchering code from here and other sources on the internet to do my database.

    I have my database done for the most part, i just have a few minor problems i cannot figure out.

    My first problem is with Modal boxs I'm not really sure how to address.

    I have an unbound Modal with http://allenbrowne.com/casu-08.html which runs a report i have based on the date range entered in the Modal Dialogue. In my report i have =[Forms].[frmWhatDates].[txtStartDate] and end date which displays the dates correctly when i run the Modal from the Tables shutter bar on the left. BUT, if i open the Form from a command button with a simple openform macro, when my report is displayed i get an #Error in my StartDate and EndDate feilds.

    My question is why does it display the dates correctly when i open the Modal from the Shutter but not from a Command button in my home form page?

    My other problem is, when i run the report It will display behind the Modal, When i close the modal it will tab over to the form with the command button that opened it, and i have to click back to the report. Is there a way to keep it from going back to the Form and staying on the report when i close the modal??

    Thanks!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    Would you like to provide project for analysis? The Attachment Manager is below the Advanced post editor. Copy, remove confidential data, run Compact & Repair, zip if still large.
    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
    qunniq is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2012
    Posts
    3
    Certainly.

    its the temporarly named fromwhatdates button in the middle.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    I just tested code and the report opens fine. The start and end dates I input are showing. Can't replicate the issue.

    I don't use macros, only VBA. Noticed something weird. The frmWhatDates button has [Embedded Macro] in the Click property, but there is a Click event in the VBA code. If I delete the VBA procedure the property is cleared. I don't see how this could be related to your issue (which I can't replicate), just find it odd.

    I don't know why the report won't stay forward. This is not an issue I have encountered in my projects.
    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
    qunniq is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2012
    Posts
    3
    Strange... maybe I'll fool around with another one from scratch and see if i get the same results

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    About your report hiding behind form, don't know if this is related, but I never set a form as Popup. And I don't set Modal until I am comfortable with db design and code behavior. Both settings are a nuisance during debugging.

    Instead of Popup setting, I open form with the acDialog parameter in DoCmd.OpenForm. The acDialog suspends code execution in the calling form until the 'popup' is closed, can't do anything else until it is dealt with.

    As far as I can tell, the only thing Popup really does is 'float' the form (and aggravate me during debugging). The Modal setting prevents going to other form. So Modal I will use.
    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. Working with date ranges
    By Acegundam in forum Queries
    Replies: 3
    Last Post: 11-04-2011, 02:04 PM
  2. Filter to a date range ala Allen Brown
    By kekawaka in forum Forms
    Replies: 2
    Last Post: 10-10-2011, 12:19 PM
  3. Date ranges using Calendar control
    By LilMissAttack in forum Forms
    Replies: 8
    Last Post: 08-25-2011, 10:04 AM
  4. Select Query Using Different Date Ranges
    By Hemi426 in forum Queries
    Replies: 3
    Last Post: 07-26-2010, 01:06 PM
  5. summing values associated with date ranges
    By wdemilly in forum Reports
    Replies: 0
    Last Post: 07-17-2009, 01:53 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