Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / May 2007

Tip: Looking for answers? Try searching our database.

Disappear the New Empty Record

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kimon - 26 May 2007 12:59 GMT
Hi,

I have a form with the DefaultView Property as Continuous Forms.
The record of this form contain 2 fields

My question is
When I click the ADD button in the form it adds a new record.
If i don't fill any of the fields of the new record and i focus another
record(field) of the continoous form, the form display and the empty
record(New).

How can I disappear the empty new record from the remainder list

Thanks in advance
Signature

Kimon

Rick Brandt - 26 May 2007 13:14 GMT
> Hi,
>
[quoted text clipped - 10 lines]
>
> Thanks in advance

That row is always shown as long as the form and recordsource for the form
support new record insertion.  If you set the AllowAdditions property of the
form to No then that line should be removed.

Signature

Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt   at   Hunter   dot   com

missinglinq - 26 May 2007 15:35 GMT
Of course, if you do that, you'll also have to add a custom "Add Record"
button, because the native Access AddRecord button will be grayed out.

Signature

There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Kimon - 29 May 2007 06:16 GMT
If i had only a field in this record it easy, i would use

in the lost focus property of the field : if me.newrecord = true and
isnull(fieldname (...)= true
then me.allowadditons = false but now i have 2 fields and i want to get the
position of the record (bookmark) to compare it, with the new position of the
record (if the user move the focus in an ohter record). That command i am
going to put it in te form property.

Thanks in advance
Signature

Kimon

> > Hi,
> >
[quoted text clipped - 14 lines]
> support new record insertion.  If you set the AllowAdditions property of the
> form to No then that line should be removed.
Rick Brandt - 29 May 2007 13:03 GMT
> If i had only a field in this record it easy, i would use
>
[quoted text clipped - 4 lines]
> position of the record (if the user move the focus in an ohter
> record). That command i am going to put it in te form property.

I don't understand what you are saying.  Do you want to allow new records to be
added or not?  Or do you only want them to be added under certain conditions?
If the last then what are those conditions?

Signature

Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt   at   Hunter   dot   com

Kimon - 29 May 2007 19:23 GMT
The conduition is : if the user don'fill any of the fields of the new record
and move the focus in an other record of the file then i want to set the
allowaddion off.
Signature

Kimon

> > If i had only a field in this record it easy, i would use
> >
[quoted text clipped - 8 lines]
> added or not?  Or do you only want them to be added under certain conditions?
> If the last then what are those conditions?
Kimon - 31 May 2007 10:04 GMT
hi,

The problem I am dealing with is the following one:
In a continuous form, when the user clicks on the “add new record” button,
the form adds a new blank record.
When the user moves the cursor in another record of the list, without
filling the previously mentioned “new record”, this “new record” remains in
the list.
How can I make the “new record” - which remains blank – disappear from the
list?

Another question also:

Can I use the command “bookmark” and how?

I would appreciate a prompt reply. Thank you in advance for your attention.

Signature

Kimon

> > If i had only a field in this record it easy, i would use
> >
[quoted text clipped - 8 lines]
> added or not?  Or do you only want them to be added under certain conditions?
> If the last then what are those conditions?
Rick Brandt - 31 May 2007 14:19 GMT
> hi,
>
> The problem I am dealing with is the following one:
> In a continuous form, when the user clicks on the "add new record"
> button, the form adds a new blank record.

Unless you start out with AllowAdditions = No then this is not true.  What
happens is that the user is navigated to the new record position that was
there all the time.  It was just at the bottom where you couldn't see it.
That is why when they leave it, it is still there.  On a form that allows
new entries it is ALWAYS there.

> When the user moves the cursor in another record of the list, without
> filling the previously mentioned "new record", this "new record"
> remains in the list.

As stated, that is expected and normal.  It is only a place to enter a new
record.  It is not an actual record in the underlying table.

> How can I make the "new record" - which remains blank - disappear
> from the list?

You would have to set AllowAdditions = No in the Current event of the form.

> Another question also:
>
> Can I use the command "bookmark" and how?

Use it to do what?  Usually it is used to navigate the form to a particular
record. You search teh RecordsetClone for a desired record, then set the
bookmakr of the form to the bookmark of the RecordsetClone and the form
moves to that record.

One of the choices in the ComboBox wizard will write this code for you so
you can see an example.  Just pick the option to "Find a record on my form
based on the selection".

Signature

Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt   at   Hunter   dot   com

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.