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 / Modules / DAO / VBA / February 2005

Tip: Looking for answers? Try searching our database.

Detecting a new record on a subform

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David C. Holley - 24 Feb 2005 13:31 GMT
I need to change which controls are displayed if the user is on a new
record. I'm trying to use the isNewRecord() function to handle this,
however the function is not detecting that the user has moved to a new
record when I click on the NEW RECORD navigation button.

As you can guess, I'm trying to detect when a new record has been added
to a subform/when the subform has moved to a new record.

David H
Paul Overway - 24 Feb 2005 13:52 GMT
You need code in the Form_Current event for the subform, i.e.,

If Me.NewRecord then
   'Hide controls
Else
   'Unhide controls
End if

You also need to call Form_Current from Form_Afterupdate (so the controls
will be shown after record is added).

One post on a given topic is sufficient.  Multiple posts aren't going to
help any unless you are clarifying something, in which case you should post
under the same thread.

Signature

Paul Overway
Logico Solutions
http://www.logico-solutions.com

>I need to change which controls are displayed if the user is on a new
>record. I'm trying to use the isNewRecord() function to handle this,
[quoted text clipped - 5 lines]
>
> David H
David C. Holley - 25 Feb 2005 02:31 GMT
Did I post multiple times?

> You need code in the Form_Current event for the subform, i.e.,
>
[quoted text clipped - 10 lines]
> help any unless you are clarifying something, in which case you should post
> under the same thread.
David C. Holley - 25 Feb 2005 02:38 GMT
Sorry  about the double posting. I posted the first message and then
realized that I could state the problem a bit easier and forgot to
cancel the first.

> You need code in the Form_Current event for the subform, i.e.,
>
[quoted text clipped - 10 lines]
> help any unless you are clarifying something, in which case you should post
> under the same thread.
 
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.