Results 1 to 3 of 3

Thread: Invisible records?

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    2

    Question Invisible records?

    I've got a strange problem here.

    I've got a form that allows users to:
    1) select a database using the openfile dialog
    2) using the database path selected, use the JET_SCHEMA_USERROSTER, harvest the machinenames, logins, etc of all users currently logged into the database.
    3) writes these names to a table called tblUsersOn

    the code then requeries a subform that is driven directly by tblUsersOn and executes some code that works with the RecordCount of the recordset.

    Problem:
    1) the subform does not requery. In fact, after the delete query executes (to clear out the old information in preparation for the new records) the subform never shows the new records

    2) the recordset doesn't see the records in the table. Even though there are 10 records in the table, the code errors on:
    rst.MoveFirst, rst.RecordCount, or rst.MoveLast

    3) when I run an append query or delete query from code, the warnings do not indicate that I am adding or deleting any records. If I perform the same operations without using code, they work fine.

    4) Sometimes, if I step through the code, it works. Sometimes, it doesn't. About 8 times out of 10, it doesn't work.

    Attached is a text file containing my code.

    Any suggestions would be greatly appreciated,
    Crystal
    Attached Files Attached Files

  2. #2
    Fanatic Member Matt_T_hat's Avatar
    Join Date
    Dec 2001
    Location
    '76 Male Body Evil-Errors: 666
    Posts
    774

    Re: Invisible records?

    Originally posted by LynchurianBlue
    I've got a strange problem here...
    ...Sometimes, if I step through the code, it works. Sometimes, it doesn't. About 8 times out of 10, it doesn't work.
    How old is the database? No, not the version - the file? How long has it been under development? Old versions of the code can hang arround within the file. Compact and repaire does not always clean it up. Sometimes msaccess.exe /uncompile mybd.mdb from the command line and then C+R is supposed to be better for getting rid of unexplainable problems.

    Also you can try creating a new DB and importing EVERYTHING from the old one. Strangly it should be fast and more efficient.
    ?
    'What's this bit for anyway?
    For Jono

  3. #3
    Hyperactive Member Granty's Avatar
    Join Date
    Mar 2001
    Location
    London
    Posts
    439
    Sorry man, cant download your attachment at work

    A couple of points tho....

    2) This may depend on the type of recordest you use. You may want to try closing your recordset and re-opening it. Btw, is your form bound to the table?

    3) You do not get the warnings for action queries if you are using the .Execute method.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width