PC Review


Reply
Thread Tools Rate Thread

Code which worked before stopped working (now runtime error 429)

 
 
Boris
Guest
Posts: n/a
 
      23rd Jan 2006
On some computers (of course only at the client :-) this VBA code throws
error 429:

Me![cmdButton].Enabled = Me![subForm].Form.Recordset.RecordCount > 0

This code is used in Form_Current(). The idea is that a button on the form
should only be enabled if there is at least one record in a subform.

This code works on my computer (Access 2003) and also worked for a long time
on the computers of the client (Access 2002 and Access 2003). For some
reason this line stopped working now. While the error is caught in Access
2003 I've seen Access 2002 sometimes even crashing.

I don't know if the client changed the configuration and/or installed new
programs. Does anyone have an idea why this code might not work and what
might cause runtime error 429? Could this be a race condition as the number
of records of a subform is checked while Form_Current() is executed? Or
could it be related with DAO?

Boris


 
Reply With Quote
 
 
 
 
Allen Browne
Guest
Posts: n/a
 
      23rd Jan 2006
Try referring to the RecordsetClone of the form rather than its Recordset:

Me![cmdButton].Enabled = Me![subForm].Form.RecordsetClone.RecordCount > 0

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Boris" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On some computers (of course only at the client :-) this VBA code throws
> error 429:
>
> Me![cmdButton].Enabled = Me![subForm].Form.Recordset.RecordCount > 0
>
> This code is used in Form_Current(). The idea is that a button on the form
> should only be enabled if there is at least one record in a subform.
>
> This code works on my computer (Access 2003) and also worked for a long
> time on the computers of the client (Access 2002 and Access 2003). For
> some reason this line stopped working now. While the error is caught in
> Access 2003 I've seen Access 2002 sometimes even crashing.
>
> I don't know if the client changed the configuration and/or installed new
> programs. Does anyone have an idea why this code might not work and what
> might cause runtime error 429? Could this be a race condition as the
> number of records of a subform is checked while Form_Current() is
> executed? Or could it be related with DAO?



 
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
Runtime error and "IE stopped working" stuart Windows Vista General Discussion 11 10th May 2009 05:12 AM
Macro that worked stopped working Freddy Microsoft Excel Programming 2 11th Mar 2009 12:35 PM
Code worked once only. then stopped. Carol G Microsoft Outlook VBA Programming 4 28th Nov 2006 08:51 PM
Code which worked before stopped working (now runtime error 429) Boris Microsoft Access Form Coding 1 23rd Jan 2006 03:16 PM
?? Remote Assistance - Worked OK, then stopped working Barbara Windows XP Help 0 24th Feb 2004 03:35 AM


Features
 

Advertising
 

Newsgroups
 


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