Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    afa is offline Novice
    Windows 8 Access 2013
    Join Date
    Feb 2016
    Posts
    22

    Form Data Entry

    Hello,

    Why is it that even after I set DataEntry to "Yes", does my form populate with the first record in the table.


    Does it have anything to do with the fact that my table is now connected to an ODBC database?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Shouldn't. What code is used to open it? Or does any code run when the form opens?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    As Paul suggested, DoCmd.OpenForm can sometimes cause the secondary Form's Properties to be ignored.

    Setting the Data Entry property in code, rather than in the Properties Pane, can sometimes override the above behavior:

    Code:
    Private Sub Form_Load()
     Me.DataEntry = True
    End Sub


    Also, if the Form, itself, is Read-Only, the first Record will display, even with Data Entry set to Yes.

    Can you, in fact, add a New Record, after the Form is opened?

    Linq ;0)>

  4. #4
    afa is offline Novice
    Windows 8 Access 2013
    Join Date
    Feb 2016
    Posts
    22
    Quote Originally Posted by pbaldy View Post
    Shouldn't. What code is used to open it? Or does any code run when the form opens?

    No code runs when the form opens as far as I know, it is just an OpenForm command.



  5. #5
    afa is offline Novice
    Windows 8 Access 2013
    Join Date
    Feb 2016
    Posts
    22
    How do I change the form to not be Read-Only?

  6. #6
    afa is offline Novice
    Windows 8 Access 2013
    Join Date
    Feb 2016
    Posts
    22
    After, entering the code provided Form_Load() in the On Load as an Event Procedure, it still showed the first record instead of the blank record

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    What is the record source of the form (table or query)? If a query, can you add a record directly in the query? I'm guessing not:

    http://allenbrowne.com/ser-61.html
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  8. #8
    afa is offline Novice
    Windows 8 Access 2013
    Join Date
    Feb 2016
    Posts
    22
    The record source of the form is a table.

  9. #9
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Can you attach the db here?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  10. #10
    afa is offline Novice
    Windows 8 Access 2013
    Join Date
    Feb 2016
    Posts
    22
    I could, however the tables will not work due to the SQL tables being connected through an ODBC connection.

  11. #11
    afa is offline Novice
    Windows 8 Access 2013
    Join Date
    Feb 2016
    Posts
    22
    I wouldn't mind sharing my screen, if you have Skype for Business or other means?

  12. #12
    afa is offline Novice
    Windows 8 Access 2013
    Join Date
    Feb 2016
    Posts
    22
    join.me is a good sharing site

  13. #13
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    If you open the linked table in Access, can you add a record?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  14. #14
    afa is offline Novice
    Windows 8 Access 2013
    Join Date
    Feb 2016
    Posts
    22
    I would not like to disconnect the tables from the SQL server because this was not a problem when the tables were local in the Access database. Once I made the SQL connection, there was an issue. I did this in another database once (using a SQL connection to a table), and it was not a problem. Now it seems to be.

  15. #15
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    I didn't suggest disconnecting them, I asked if you could add a record to the linked table. If not, my guess is the SQL Server table doesn't have a primary key; that makes it read only when linked.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 2
    Last Post: 12-11-2015, 02:55 PM
  2. Replies: 3
    Last Post: 02-25-2015, 04:48 PM
  3. Replies: 5
    Last Post: 03-09-2014, 07:16 PM
  4. Replies: 7
    Last Post: 02-08-2014, 12:31 PM
  5. Replies: 5
    Last Post: 08-12-2013, 12:53 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