PC Review


Reply
Thread Tools Rate Thread

Detecting a new record on a subform

 
 
David C. Holley
Guest
Posts: n/a
 
      24th Feb 2005
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
 
Reply With Quote
 
 
 
 
Paul Overway
Guest
Posts: n/a
 
      24th Feb 2005
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.

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


"David C. Holley" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>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



 
Reply With Quote
 
David C. Holley
Guest
Posts: n/a
 
      25th Feb 2005
Did I post multiple times?

Paul Overway wrote:
> 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.
>

 
Reply With Quote
 
David C. Holley
Guest
Posts: n/a
 
      25th Feb 2005
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.

Paul Overway wrote:
> 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.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Double click record in subform to go to new record in Main (and subform) Jpipher@gmail.com Microsoft Access 14 3rd Feb 2007 07:06 AM
Wierd subform behaviour, subform not cycling through after updating a subform record Mikal Microsoft Access Forms 2 25th May 2006 07:15 PM
code to delete a record in one subform when a record in a related subform is deleted Helen Microsoft Access Form Coding 3 3rd Apr 2005 10:01 PM
Urgent !!! - Values from Subform - #Error if no records in Subform and Only grabs first subform record Greg Microsoft Access Forms 0 17th Feb 2005 01:12 PM
Record Source in Subform not detecting NULL =?Utf-8?B?R2Vvcmc=?= Microsoft Access Forms 0 22nd Dec 2004 03:11 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:46 AM.