Way to eliminate/hide automatic new row?

  • Thread starter Thread starter Laurel
  • Start date Start date
L

Laurel

I have developed a very messy bit of code to make the automatically inserted
new row in my form invisible. I think it's confusing to the user to think
its OK to start entering data before they have entered the data that would
fill the form with the proper pre-existing information. (I also think there
may have been serious processing issues too, but I forget all the reasons
for hiding it.)

This seems like it would be a very common thing to want to do - just present
an empty form until the user has entered certain info. I prefer not to
resort to subforms.

Is there some simple technique I'm just not aware of?

TIA
Laurel
 
I'm not sure how you expect Access or any other database app to work, but
you might want to look at some of the sample databases. Any bound form will
display the first record(s) of the underlying record set (usually a table or
query) for viewing/editing. On that form commonly, there is a command
button (or use the built-in record selector "*") to add new records. A form
that has its Data Entry property = Yes, will display a blank controls, ready
for data entry, and will save the new record when moving to another new
record, or closing the form.
-Ed
 
perhaps you could set your form's "AllowEdits" property to off. This would
eliminate the new record line altogether. This property can be set with VBA
code as well so you can use this in conjunction with validation code.

John
 
Ed Robichaud said:
I'm not sure how you expect Access or any other database app to work, but
you might want to look at some of the sample databases.

I've worked with a variety of programming languages and PowerBuilder, and in
none of those instances is an empty row displayed before I've told the form
what I want to happen. If I want an empty row, I insert it specifically.
Any bound form will
display the first record(s) of the underlying record set (usually a table or
query) for viewing/editing. On that form commonly, there is a command
button (or use the built-in record selector "*") to add new records. A form
that has its Data Entry property = Yes, will display a blank controls, ready
for data entry, and will save the new record when moving to another new
record, or closing the form.

I guess, from what you're saying, you don't know of a way to prevent the
display of the empty record in an updatable form. Do I understand
correctly?
 
I also work with PowerBuilder,Clarion/Topspeed, Alpha5, dBase and Paradox,
but to answer your question, if you want to suppress the Add New "row" in a
datasheet or continuous type form, look at the form properties and set the
Allow Edits to yes, Allow Additions to No. Youy will, of course, have to
provide users some other method of adding new records.
-Ed
 
Back
Top