Results 1 to 8 of 8
  1. #1
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904

    Suppressing Extra Row at Bottom of Continuous Form

    Hello. Long-time user of Access here, and I have encountered a quirk I have never seen before.

    I have set-up a Continuous Form from a query where users can enter in values to pre-existing records. I do not want the user to be able to add or delete any records here, simply update existing records that they arrive at from a Selection Form I have created. So I have gone into the Properties of the Form and set the following Property values on my Form:
    - Data Entry: No


    - Allow Additions: No
    - Allow Deletions: No
    - Allow Edits: Yes
    - Record Selectors: No
    - Navigation Buttons: No

    It lists all the records (from the Detail section), but for some reason it also shows a blank row underneath the last record. It allows the user to start typing into this blank record, though it errors out when they try to leave it, as the user cannot enter in the key fields for a new record.

    It is good that they cannot enter/save new records, because I do not want to allow that, but I cannot figure out why it is displaying this blank record at the bottom, and want to suppress/hide it. Usually, setting the Properties to the values I have shown above do the trick, but for some reason it does not appear to be working.

    Has anyone seen anything like this, or know how to hide this "false" blank record? Thanks.
    BTW, I am using Access 2007.

  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,902
    Cannot replicate the issue. Want to provide your db for analysis? Follow instructions at bottom of my post.
    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
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Because of the fact that

    • The AllowAdditions Property is set to No
    • But the Access Gnomes are still allowing A New Record to be initiated

    my guess would be that the Form in question is being Opened using code similar to

    DoCmd.OpenForm "ContinuousFormName", , , , acFormEdit

    or the Macro equivelent, thinking that the acFormEdit argument would only allow the editing of Records. The problem with this assumption is two-fold:

    1. acFormEdit allows for the Editing of Existing Records and the Adding of New Records
    2. acFormEdit tells Access to ignore the AllowAdditions and AllowEdits Properties of the Form being Opened as set in that Form's Properties Pane!


    To allow the AllowAdditions and AllowEdits Properties of the Form being Opened to act as set in the Properties Pane, i.e.

    • AllowAdditions set to No
    • AllowEdits set to No

    you need to Open the Form with code like this

    DoCmd.OpenForm "ContinuousFormName", , , , acFormPropertySettings

    The acFormPropertySettings argument tells Access to respect the Form's Properties as set in the Properties Pane.

    Sorry, but I have no idea how to accomplish this using a Macro, or even if it can be accomplished using a Macro! That's one of the problems with Macros, they're too limited/rigid in what they can and cannot do, which is why most experienced Access developers do not use them!

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  4. #4
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Quote Originally Posted by Missinglinq View Post
    you need to Open the Form with code like this

    DoCmd.OpenForm "ContinuousFormName", , , , acFormPropertySettings
    Thanks, that did the trick. I figured (hoped) it was something fairly basic like that.

    Quote Originally Posted by Missinglinq View Post
    Sorry, but I have no idea how to accomplish this using a Macro, or even if it can be accomplished using a Macro! That's one of the problems with Macros, they're too limited/rigid in what they can and cannot do, which is why most experienced Access developers do not use them!

    Linq ;0)>
    I am not using a Macro, I am using VBA, so your answer gave me what I needed. I know what you are saying about Macros, I rarely use them myself because of their rigidity. I have been programming in Access VBA for about 10 years now.

    Thanks for the help!

  5. #5
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Glad you got it working!

    I think just before answering your question I was working on a problem for someone else who was using Macros, and still had that on my mind! VBA is the only way to go, for serious development.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  6. #6
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    VBA is the only way to go, for serious development.
    I wholeleartedly agree!

  7. #7
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Great insight on the issue, Linq. I, of course, agree about VBA. I use macros only if I absolutely have to and so far that has happened twice. But I have never created a web database. I understand that macros might be required for that, especially if using Sharepoint.
    Last edited by June7; 06-13-2012 at 06:33 PM.
    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.

  8. #8
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Quote Originally Posted by June7 View Post
    ...I understand that macros might be required for that, especially if using Sharepoint.
    Have no clue and don't really care! Security-wise, as you probably know, Access is a mess! And the idea of taking an Access app and putting in on the web sounds like a surefire path to disaster!

    I keep my ears open, of course, always willing to learn, but in doing this kind of thing, here and on other forums, 8 hours a day, 7 days a week for past 6 years, I've really seen very few threads relating to that kind of thing! And if you're right, and they require heavy Macro usage, I surely won't go down that trail!



    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

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

Similar Threads

  1. Replies: 2
    Last Post: 11-30-2011, 07:24 PM
  2. Open form and locate it on the bottom
    By Dominaz in forum Forms
    Replies: 4
    Last Post: 11-17-2011, 08:03 PM
  3. Suppressing a msgbox
    By alphabetsoup in forum Forms
    Replies: 3
    Last Post: 10-04-2011, 10:30 AM
  4. can't update form-in the bottom bar of
    By ymds in forum Access
    Replies: 2
    Last Post: 07-19-2010, 06:26 AM
  5. Suppressing #Name? Error
    By Jess_Wundring in forum Programming
    Replies: 2
    Last Post: 04-15-2010, 12:43 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