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 / October 2005

Tip: Looking for answers? Try searching our database.

Subform problems

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Neil M - 31 Oct 2005 14:04 GMT
Hi,

I have a subform within a  form.
At the top of the form I have filter combo boxes that will change the
subform below, but I have the problem where I select a new filter it auto
adds a blank record to the database table (as it queries the subform)

How do I stop this doing this and only allowing me to add a record when
clickin within the subform (datasheet)

Thanks.
Al Camp - 31 Oct 2005 14:22 GMT
Neil,
  Seeing a new record at the end of any continuous subform dataset is
normal.  It really hasn't "added" a new blank record, but it's there, ready
for data entry.  A new record is only created when data is entered and
saved, then a new "New" record is immediately created.

  If you must... use the AllowAdditions property of the subform.  On the
main form, select the subform object, and in the Enter and Exit events...

Private Sub frmTest1Sub_Enter()
   Forms!frmTest1.frmTest1Sub.Form.AllowAdditions = True
End Sub

Private Sub frmTest1Sub_Exit(Cancel As Integer)
   Forms!frmTest1.frmTest1Sub.Form.AllowAdditions = False
End Sub

Signature

hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

> Hi,
>
[quoted text clipped - 7 lines]
>
> Thanks.
 
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.