Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    Quote Originally Posted by ItsMe View Post
    Yes I believe you are tracking well.

    So the EOF is the end. I think you are understanding this correctly. You do not always need the EOF. If you try to loop past the end with say a .moveNext it will error and launch the debugger. This is when you NEED to use .EOF

    Alternatively, you could count the records and do until I = count or something like that. There is not any need to count the records using .EOF. But there are other tools to use also.

    When you change a record via code while you have the form open I don't believe it will send a message to the user about updated records unless.....

    You are not focused on the form while the code is executing. Don't quote me on that though. If I am opening a form to edit a recordset that another form is viewing, you will get a message saying the record has changed. So the best way to handle this is to save the record before losing focus.

    You need to test it and see if the warning is coming up. If it is, call the form via VBA and save.

    .
    Why use a clone in the first place if you can just use .eof to avoid the whole error on the regular form with original record set?

    If it gets to the end and encounters an error wouldn't .eof cover that?

    or is it so that it all works in the background without anything visible making it cleaner the reason you make a clone at all?

  2. #17
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    I suggest you not worry about possibly getting an error until after you implement a working model.

    Try not to focus on EOF so much. When you create a clone, you are creating another object (much like a virtual form). With the clone you can manipulate it how you want to without affecting what the user sees. Although, they may see an hourglass while the code runs.

    If you want to learn more about it, take a look at creating recordsets using DAO. DAO is a method to act upon an object. In the case described here, the object is a recordset clone.

    You act on objects all the time when you work in Access. There are many methods available. DAO is one way to go about it. if you want to understand more about what EOF is, do some research on DAO

  3. #18
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    Quote Originally Posted by ItsMe View Post
    I suggest you not worry about possibly getting an error until after you implement a working model.

    Try not to focus on EOF so much. When you create a clone, you are creating another object (much like a virtual form). With the clone you can manipulate it how you want to without affecting what the user sees. Although, they may see an hourglass while the code runs.

    If you want to learn more about it, take a look at creating recordsets using DAO. DAO is a method to act upon an object. In the case described here, the object is a recordset clone.

    You act on objects all the time when you work in Access. There are many methods available. DAO is one way to go about it. if you want to understand more about what EOF is, do some research on DAO
    Thanks, I'm reading up now on DAO, had no idea that was sort of the engine for the current database and you request it to make changes to your database (or even another database) by referring to it in VBA (which means I can manipulate the database via VBA right?) which I knew none of this before.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 17
    Last Post: 07-31-2013, 11:35 AM
  2. Replies: 1
    Last Post: 01-24-2013, 05:50 PM
  3. Replies: 4
    Last Post: 08-02-2012, 10:59 AM
  4. query won't display records with no related records
    By James Brazill in forum Queries
    Replies: 1
    Last Post: 06-28-2011, 02:10 AM
  5. Date function to query records and Sum records
    By sullynivek in forum Queries
    Replies: 0
    Last Post: 04-05-2011, 08:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums