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

Tip: Looking for answers? Try searching our database.

me.newrecord

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alain - 25 Apr 2005 18:10 GMT
Hi to all,

I would like to use the Me.NewRecord but cannot it, when I compile it give
me method or data member not found
What is the reference I need to use for this

TIA

Alain
Dirk Goldgar - 25 Apr 2005 18:35 GMT
> Hi to all,
>
[quoted text clipped - 5 lines]
>
> Alain

Where are you using it?  It's only meaningful in a form's class module.

Signature

Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

Alain - 25 Apr 2005 18:53 GMT
I'm using it behind a checkbox event

Private Sub Check5_Click()
If Me.NewRecord Then Exit Sub
' active checkbox
  If Check7 = True Then
   Check7 = False
  End If
End Sub

Alain

>> Hi to all,
>>
[quoted text clipped - 7 lines]
>
> Where are you using it?  It's only meaningful in a form's class module.
Dirk Goldgar - 25 Apr 2005 19:45 GMT
> I'm using it behind a checkbox event
>
[quoted text clipped - 20 lines]
>> Where are you using it?  It's only meaningful in a form's class
>> module.

I don't see any reason that should not work.  Are you sure the error is
occurring on that line, referring the NewRecord property?

Signature

Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

Alain - 25 Apr 2005 20:33 GMT
Ye it is and the fun part is that I use the same validation on another db
and it is working (compiling) just fine, I have alson double check all the
references and they are the same...

I'll keep double checking everything to try to solve this mystery

Thanks

Alain

>> I'm using it behind a checkbox event
>>
[quoted text clipped - 23 lines]
> I don't see any reason that should not work.  Are you sure the error is
> occurring on that line, referring the NewRecord property?
Dirk Goldgar - 25 Apr 2005 21:04 GMT
The only thing that occurs to me now is that your form or database may
be corrupt in some way.  If so, possibly you could cure it by
decompiling the database.  However, it's also quite possible there's
just something simple that we've overlooked.

Signature

Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

> Ye it is and the fun part is that I use the same validation on
> another db and it is working (compiling) just fine, I have alson
[quoted text clipped - 27 lines]
>> I don't see any reason that should not work.  Are you sure the error
>> is occurring on that line, referring the NewRecord property?
Alain - 26 Apr 2005 14:43 GMT
Hi Dirk,

just found the problem, there was some old code on a unused  form that it is
not being used anymore. It seem that I have some more clean up to do, but
the stange thing is when I was compiling before this error was not hapenning
at all, so I am starting to think that may be the db is getting corrupted.

BTY how do I decompile a db

Thanks

Alain

> The only thing that occurs to me now is that your form or database may
> be corrupt in some way.  If so, possibly you could cure it by
[quoted text clipped - 32 lines]
>>> I don't see any reason that should not work.  Are you sure the error
>>> is occurring on that line, referring the NewRecord property?
Dirk Goldgar - 26 Apr 2005 18:28 GMT
> Hi Dirk,
>
[quoted text clipped - 5 lines]
>
> BTY how do I decompile a db

1. With the database closed -- no users in it at all -- and (ideally)
Access not running, make a backup copy.

2. On the task bar, click Start -> Run...

3. Enter this (adapted to match your database path and name) in the Run
dialog box and click OK:

   msaccess.exe /decompile "C:\My Documents\YourDBName.mdb"

You may need to include the full path to msaccess.exe, but I don't find
that to be the case when I try it.  Depending on your Access version,
you may not get any sign that anything in particular happened.  Your
database will probably open in Access.

4. Compact and Repair your database.

5. Open the database again, press Alt+F11 to switch to the VB Editor,
and click Debug -> Compile (your project).  If any errors appear, fix
them and recompile.

6. Close the VB Editor.  Compact & Repair again.

Signature

Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

postman - 29 Apr 2005 07:47 GMT
Excuse me for jumping in, but will decompiling fix these two problems I had
trouble with & just in case it happens again: 1. Access shut down before I
was able to close the database window, it won't open at all and throws an
database not MS Access blabla.., I eventually rewrote the whole thing. & 2.
I have been testing my new database so have accrued a number of entries in
all my tables & will need to get rid of them (returning record numbers to 0
for when I deploy it.
Thanks.

>> Hi Dirk,
>>
[quoted text clipped - 28 lines]
>
> 6. Close the VB Editor.  Compact & Repair again.
Dirk Goldgar - 29 Apr 2005 16:57 GMT
> Excuse me for jumping in, but will decompiling fix these two problems
> I had trouble with & just in case it happens again: 1. Access shut
[quoted text clipped - 3 lines]
> have accrued a number of entries in all my tables & will need to get
> rid of them (returning record numbers to 0 for when I deploy it.

The first problem sounds like a different kind of corruption, and not
one that I would expect decompiling to solve, I'm sorry to say.  I
suggest you read Tony Toews' Corrupt Access MDBs FAQ page:

   http://www.granite.ab.ca/access/corruptmdbs.htm

The second problem, or rather wish, can generally be accomplished by
deleting all the existing records, then compacting the database by
clicking the menu items Tools -> Database Utilities -> Compact and
Repair Database...   If that doesn't reset the autonumbers to zero, your
installation of Access and Jet is probably not up to date, and you
should visit Office Update to patch it.

Signature

Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

 
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.