Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 12th, 2003, 08:59 PM
Registered User
 
Join Date: Oct 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Adding a record using a form

Hi all. I know this is a stupid question but currently I have a database that allows you to add a record using a form. My issue is when I open the form up, there is already data in all my fields, so when I overwrite the fields the previous record is removed from my database. Is there a way to open the form with no records showing, just a blank form?
Cheers
Cailo

 
Old October 12th, 2003, 10:59 PM
Authorized User
 
Join Date: Jun 2003
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Cailos,

There are two ways you can do this:

1. You can set up your form as data entry only. You won't see any previous records and it will always open up as blank form. In design view of your form, click on form properties and under All tab, select Data Entry = Yes
2. To be able to view previous records, but open to blank (new) record each time form opens, create a macro called mcrLastRecord or similar. Under Actions, Select "GoToRecord" and on the bottom, select "New" Record. Save this macro. Go back to your form and in properties, Event tab, OnCurrent, select the macro from drop down list. Open form in form view and should work.



Vladimir
 
Old October 12th, 2003, 11:10 PM
Registered User
 
Join Date: Oct 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks alot vladimir.

Works perfect.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding record to database? werD420 Classic ASP Databases 5 January 20th, 2005 06:27 PM
Adding or updating record using VBA egivler Access VBA 0 August 31st, 2004 11:06 AM
Adding a new record to a dataset Louisa VB.NET 2002/2003 Basics 1 January 14th, 2004 05:33 PM
Add New compliling, but not actually adding record Louisa VB.NET 2002/2003 Basics 1 January 12th, 2004 11:15 AM
trouble adding new record TnTandyO Classic ASP Databases 1 November 4th, 2003 02:20 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.