Results 1 to 2 of 2
  1. #1
    ismith is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Posts
    39

    How do I show the last record entered from my database in a Bound Textfield?

    Hello,



    I have a form with bound textfields.

    These used to show the last record that was entered in it by using:

    Code:
    Forms!frmProduct.Recordset.FindFirst "ProductID = " & DMax("ProductID", "tblProduct")
    that code used to work and it used to show the last product in the databse.

    What ive done right now is ive opened a form from Create -> More Forms -> Modal Dialgos

    and ive pasted the same form and the same code into that.

    Its now giving me an error which says:

    Run Time Error '91'
    Object vairable or with Block variable not set.

    How can i sort this out and populate the bound fields with the last record in the databse?

    Thanks..

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Your original form still works? Issue is with new form? Assume you changed form name in the code?

    Post the entire code procedure or provide project for analysis.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Using bound form to access last record
    By ismith in forum Forms
    Replies: 1
    Last Post: 12-20-2011, 10:36 AM
  2. Record appear if been entered before
    By miziri in forum Programming
    Replies: 2
    Last Post: 08-17-2011, 05:36 AM
  3. Date Record Entered
    By MikeDBMan in forum Access
    Replies: 6
    Last Post: 08-01-2011, 03:59 PM
  4. Replies: 1
    Last Post: 07-17-2011, 09:02 PM
  5. Replies: 3
    Last Post: 06-02-2011, 07:40 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