![]() The only potential problem with this is if the user enters single or double quotes to any string fields as those can mess up your SQL query. So if the call to code is in any startup Macro or Form Load then it will be useless unless you protect further with code you enter prior to distributing. You can also optionally pass the method a second parametera string indicating text to be displayed within the status bar while screen updating is disabled. If they choose Yes, a SQL query stored in the VBA will then append the form's values to the target table, then clear the form. As far as the code to hide the Nav pane, if you do not use code to protect it, it can be bypassed using the bypass 'shift key' during opening. When the users click Submit, a msgbox will first pop up asking them to save and warning them they can't go back. Leave the form's record source blank (so it isn't tied to the table). Alternatively in the Navigation Pane, right-click the title bar of the group that you want to hide, and then click Hide. In the Groups for list, clear the check box next to the group that you want to hide.Regarding your idea on the submit button, here's how you can make that work. Hide a group Right-click the top of the Navigation Pane and then select Navigation Options. If the user needs to add multiple records at once, you can add a command button. ![]() If you change this to Current Record, then the user cannot tab backwards or forwards to other records. If you need the rest of the features on that bar you will need to simulate them using controls. The Cycle property in the Other tab defines how tabbing works. To remove the whole bar set the Navigation Buttons property of the form to No. Before I answer the question, are you sure preventing the user from going backwards is a good idea? Perhaps they tabbed forward to make a new record and then realized they made a mistake so they want to go back and correct it? Of course, this depends on the specific needs of your db and how it will be used. The step below is demonstrated of how to hide the Navigation Pane.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |