Results 1 to 3 of 3
  1. #1
    ShostyFan is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2013
    Posts
    76

    open to new record offset

    I have a form and in the onLoad control: DoCmd.GoToRecord , , acNewRecThe issue is when I need to open the form to a specific record, it obviously will not because of the onLoad event.



    When I remove the onload event and put the same code into a button from a main menu the form opens as expected but I can't scroll or filter a record until I create something new and that does not work for the users.

    What I need is for the form to open to a new record and be able to scroll or search before entering in something new and be able to open the same record from a different form that will go to a specific record.

    Thanks.

  2. #2
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    Your set up with the GoTo New does allow you then to find another record if you wish. So your issue is when you open the form telling it a specific record to open with. This technique puts that record ID in the filter. You can see it if you put the form into design view and look at the filter property. So what you need to do is via an event/button clear the filter.

  3. #3
    ShostyFan is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2013
    Posts
    76
    I'm not following the Clear Filter button solution. In the form properties I turned off allow form filter, and there was no change. Maybe this is more clear:
    When I open form A, everything works as expected, I get a new record and I can scroll through records.
    When I open Form A but to a specific record the form still opens to a new record and the user has to scroll back 1. My open form to record vba is:
    DoCmd.OpenForm "Frm Cash Register", acNormal, , "[WorkOrderNumber] = " & Me.WO_Number

    Is the "clear filter" solution correct and the issue is that I am implementing it wrong?

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

Similar Threads

  1. Replies: 4
    Last Post: 12-16-2014, 05:08 PM
  2. Replies: 1
    Last Post: 08-12-2013, 02:05 PM
  3. Replies: 2
    Last Post: 03-13-2013, 06:13 PM
  4. Replies: 3
    Last Post: 08-26-2012, 10:04 PM
  5. Runtime error with ActiveCell.offset
    By Eowyne in forum Programming
    Replies: 2
    Last Post: 04-22-2011, 10:31 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