Results 1 to 11 of 11
  1. #1
    AccessOneRow is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2016
    Posts
    5

    Need to generate one blank row, new to Access

    Hi All,

    Thanks in advance for reading this, I have a SQL Server 2008 database with an employees table. I need to create just one blank row for the user to fill out and submit this to the SQL Server 2008 backend. If I try it through ODBC it just gives me the whole table. How would I do this? New to Access so forgive the newbie question.

    Regards,
    Bryan

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    it don't work that way. You add the new record full of data,(append qry) not empty a record then begin entering.

  3. #3
    orange's Avatar
    orange is online now Moderator
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Can you just tell us again what you are trying to do?
    You have an Access front end that will be/is talking to Sql Server backend.

    Please expand on this:
    I need to create just one blank row for the user to fill out and submit
    You are trying to add a record to the BackEnd?
    What exactly is the purpose of the Blank row?

    If you access a table, without constraints, you will have access to the whole table.
    In other words, you get what you ask for. If you want John Doe's record, you would have code along this line
    Code:
    select * from EmployeeTable 
    Where EmployeeFirstName = "John" AND
              EmployeeLastName = "Doe"

  4. #4
    AccessOneRow is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2016
    Posts
    5
    I just want one row from the table with blank fields for them to submit, for instance FirstName, LastName, SSN, EmployeeNumber, PhoneNumber, FloorNumber, all blanks with just the field names above. They already have this, but the vba code is locked and the guy who left didn't leave the password, so I'm having to redo it. We are switching the sql server database from 2003 server to 2008 server as well as to sql server 2008. It's just one row in datasheet view.

  5. #5
    AccessOneRow is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2016
    Posts
    5
    Should I just use a form instead, I'm sure they would be ok with that.

  6. #6
    orange's Avatar
    orange is online now Moderator
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    ?? I think you are saying you want users to be able to INSERT a new record in the SQL Server table. Or perhaps you want users to be able to edit/update an existing record.

    All user interactions with a database should be through a form or forms.

    However, as long as you (or others) do not have the proper password to access the table, seems you are at an impasse. What am I missing?

  7. #7
    AccessOneRow is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2016
    Posts
    5
    Your right, just an insert of one record in datasheet view, that is the way it's setup now. But there is a lot of code behind this, like 23 class modules, so I'm assuming you have to jump through a lot of hoops just to set it up like that.

  8. #8
    orange's Avatar
    orange is online now Moderator
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Jump through hoops--- possibly.
    23 class modules?? Not your typical set up.

    With that sort of set up, I would expect some critical documentation including operational procedures. Please tell us more of the overall environment.

    Do you have a SQL Server dba?

  9. #9
    AccessOneRow is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2016
    Posts
    5
    No, I'm sa on the server. That part I know very well. I'm a DBA. I'm new to Access though, and there are a lot of Access databases around here that the previous DBA setup, locked the VBA code and left. I even tried some of those password crackers, but those are designed for a password on the Access database, not the VBA code.

  10. #10
    orange's Avatar
    orange is online now Moderator
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    I don't have experience cracking a password. Do you have any access to the previous person who created these? Surprised there is no documentation.

    When you say locked the database, is it possible he created an accde database? This removes users/everybody from manipulating code. But you must keep the original accdb file in order to do any modifications.

    It seems you are rebuilding the functionality of the front end, is that true?
    There are many participants on the forum to assist.

    Good luck.

  11. #11
    NoellaG's Avatar
    NoellaG is offline VIP
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,035
    If there are that many classes, I think the former guy used blank, unbound forms to enter the data and transmitted the records to the SQL server by SQL written in the class modules (could it be that the classes correspond to the main table data, for instance you have a table tblCustomers and a corresponding class module Customer?
    An easy solution could be: link the SQL server tables to the Access front end through ODBC, and then create some new Access forms for the tables. You can state as a recordsource something like select * from tblA where 1 = 0. This way the form starts up with an empty record. If you want to change existing data, you can designa search form (or a search section in the header of the form) to populate it with data.

    Kind regards
    NG

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

Similar Threads

  1. Generate Scripts equivalent for MS-Access
    By xfp39024 in forum Access
    Replies: 1
    Last Post: 07-13-2013, 04:31 PM
  2. Replies: 3
    Last Post: 01-17-2012, 12:07 PM
  3. Generate docs from MS access
    By matspring in forum Access
    Replies: 2
    Last Post: 05-07-2011, 07:48 PM
  4. Link Excel file to MS Access and generate rep
    By Priceless in forum Import/Export Data
    Replies: 14
    Last Post: 02-21-2011, 02:08 PM
  5. Pdf Report Generate from Access
    By ACHU in forum Reports
    Replies: 1
    Last Post: 10-29-2009, 07:49 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