English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have a form within a database I just created. I have the form writing to a table to save the data.

How do I make the form go to a blank record once I hit the "save record" button? This action writes the info to the table, but stays on that record.

Also, how do I make the form open on a blank record, rather than the first record in the table?

I haven't even begun to delve into macros, which is what this is sounding like it's leaning towards. Any help is appreciated.

2006-09-06 11:56:19 · 3 answers · asked by myaddictiontofire 5 in Computers & Internet Other - Computers

3 answers

You may consider having two forms, one for entering new data and a different one for editing existing data.

If you do this, there is no code in modules and no macros. Open your form and save it under a different name, like DataEntry.

In the form properties there is an option called 'Data Entry' on the Data tab. Change it to yes and save the form again. This setting allows only new records to be added. It won't show records after they are entered and will show the blank entry form upon opening.

You can use the original form to update existing data.

2006-09-07 07:28:22 · answer #1 · answered by Ken C. 6 · 1 0

2 strategies: in case you want to surely enable customers to operate new information, you may open the form, click View, Properties2f43b42fd833d1e77420a8dae741900 lower than the counsel tab, change information get admission to to Yes2f43b42fd833d1e77420a8dae741900 this can conceal all of your previous information even as the form is opened2f43b42fd833d1e77420a8dae741900 in case you basically favor to modify the view to a sparkling record even as the form opens, you may open up the form houses, and lower than the shape tab, go with On Open2f43b42fd833d1e77420a8dae741900 click the [2f43b42fd833d1e77420a8dae7419002f43b42fd833d1e77420a8dae7419002f43b42fd833d1e77420a8dae741900] button on the right, and choose Macro Builder2f43b42fd833d1e77420a8dae741900 keep the macro with a recognition like NewRecord and click OK2f43b42fd833d1e77420a8dae741900 Set the first action to GoToRecord, and on the bottom of the demonstrate change record to New2f43b42fd833d1e77420a8dae741900 keep the macro and close it2f43b42fd833d1e77420a8dae741900 Now once you open the form, a sparkling sparkling record will be chosen, besides the undeniable fact that the previous information will nevertheless be available2f43b42fd833d1e77420a8dae741900

2016-11-25 01:15:24 · answer #2 · answered by mansell 4 · 0 0

In the VBA code (OnClick event) for that button, enter the following as the last line of code in that event subroutine:

DoCmd.GoToRecord , , acNewRec

As for the form opening on a new record, be sure that the Form property called "AllowNewRecords" is True, and then use that same line of code above and put it in your Form_Load event.

2006-09-06 12:02:57 · answer #3 · answered by Anonymous · 0 0

fedest.com, questions and answers