By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,490 Members | 1,789 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,490 IT Pros & Developers. It's quick & easy.

Continuous Forms Question

P: n/a
I have a form, set to "Continuous Forms" to kind of give that
spreadsheet feel, but I need it in a Form because my detail section
contains some buttons I need.

In my form header, I have an "Add New Record" button.

Here's my question. I want to get rid of that last empty line. The
one where when I start adding a new record, Access automatically drops
in a last blank to type in. The reason is that when someone clicks
"Add New Record", I populate some of the fields based on other open
forms. When they can just type in the next field, that populating
doesn't kick in... though I guess I could write the code to do that.
Was just wondering if there was a way to disable the showing of that
next blank record.

Feb 27 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Open your form in design view. open properties and go to the Data tab. Set
Allow Additions to No. This gets rid of the blank new record line. You won't
be able to add a new record at this point.

Where you click "Add New Record", add this code:
Me.AllowAdditions = True
You will now be able to add a new record.

Somewhere you will need to put this code:
Me.AllowAdditions = False

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
Over 1125 users have come to me from the newsgroups requesting help
re******@pcdatasheet.com
"igendreau" <ia**********@hermanmiller.com> wrote in message
news:11**********************@j33g2000cwa.googlegr oups.com...
I have a form, set to "Continuous Forms" to kind of give that
spreadsheet feel, but I need it in a Form because my detail section
contains some buttons I need.

In my form header, I have an "Add New Record" button.

Here's my question. I want to get rid of that last empty line. The
one where when I start adding a new record, Access automatically drops
in a last blank to type in. The reason is that when someone clicks
"Add New Record", I populate some of the fields based on other open
forms. When they can just type in the next field, that populating
doesn't kick in... though I guess I could write the code to do that.
Was just wondering if there was a way to disable the showing of that
next blank record.

Feb 27 '06 #2

P: n/a
It will vary a bit depending on Access version, but go into the form properties. In Access XP, you can set 'Allow Addtions' to no. VBA code can do it too..
igendreau<ia**********@hermanmiller.com> February 27, 2006 10:43:18 am >>>

I have a form, set to "Continuous Forms" to kind of give that
spreadsheet feel, but I need it in a Form because my detail section
contains some buttons I need.

In my form header, I have an "Add New Record" button.

Here's my question. I want to get rid of that last empty line. The
one where when I start adding a new record, Access automatically drops
in a last blank to type in. The reason is that when someone clicks
"Add New Record", I populate some of the fields based on other open
forms. When they can just type in the next field, that populating
doesn't kick in... though I guess I could write the code to do that.
Was just wondering if there was a way to disable the showing of that
next blank record.

Feb 27 '06 #3

P: n/a
Worked like a charm. Just changed my code to:

Me.AllowAdditions = True
DoCmd.GoToRecord , , acNewRec
ScopeID.Value = xScopeID
Me.AllowAdditions = False

Thanks!!

Feb 27 '06 #4

P: n/a
igendreau wrote:
Worked like a charm.


Um, Steve....

Time to change what you write for pseudonyms expressing appreciation....
You may also want to vary the newsreader as well...

8)
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Feb 27 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.