Results 1 to 5 of 5
  1. #1
    Paul H's Avatar
    Paul H is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Location
    Richmond, VA
    Posts
    591

    SQL Server Data won't show up in subform


    We just migrated some tables from an local Access database to a SQL Server back end. The tables have the exact same structure and data as the original. The form is a continuous form that reads the data in this table (the other one is a look up table) stored by patient number and admit date. Using the Access table the form works as designed, looking up codes and descriptions in lkDiagnosisCode_ICD10 and storing them in tblDiagnosis_ICD10. When I switch tblDiagnosis_ICD10 to the copy on the SQL Server, the form vanishes. I get a blank white square where the subform is supposed to be. The combo boxes that do the lookups are able to read SQL Server version of lkDiagnosisCode_ICD10 identically to the Access table. Only the SQL Server version of tblDiagnosis_ICD10 causes this problem. I've opened both these tables in table view and I can read and edit the data in both versions. As far as I can tell they are identical. My thoughts were that this would be a seamless transition. What am I missing?

  2. #2
    Paul H's Avatar
    Paul H is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Location
    Richmond, VA
    Posts
    591
    Here's a critical piece I left out. I copies my form and switched back and forth between the two tables, SQL Server and Access versions. When I open the form using the SQL version I get this error.
    Click image for larger version. 

Name:	ODBC Cannot Lock all records.JPG 
Views:	23 
Size:	14.6 KB 
ID:	25345
    I do not know enough about SQL Server to diagnose this. Can you give me something I can take to our DBA?

  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
    Does the Table have a Primary Key...and is it part of the RecordSource for the Form? If these two things aren't true, using SQL Server Tables can frequently be problematic.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  4. #4
    Paul H's Avatar
    Paul H is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Location
    Richmond, VA
    Posts
    591
    The answer was No and Yes. I suspected the Primary Key issue and fixed it, not an easy thing to do as I had limited permissions on SQL Server. After some jiggering, my form seems to be functioning now.

  5. #5
    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
    Glad to hear it!

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

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

Similar Threads

  1. Replies: 4
    Last Post: 04-03-2014, 08:03 AM
  2. Replies: 5
    Last Post: 05-17-2013, 10:45 AM
  3. Replies: 7
    Last Post: 11-13-2012, 01:44 PM
  4. Replies: 8
    Last Post: 11-08-2011, 05:11 AM
  5. Subform will not show data
    By Brian62 in forum Forms
    Replies: 2
    Last Post: 02-19-2010, 10:43 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