Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Access subform not working for data entry after upsizing backend

Posted on 2014-11-19
7
332 Views
Last Modified: 2014-11-20
I am working on a project where I am upsizing an access database to Sql Server. I had very little trouble converting the tables. The application keeps track of requisitions and has a form for entering header information, and a subform that contains information about the line items. Everything works great when viewing existing data. However, when entering a new requisition, the subform does not work when entering information about the line items. It seems like it is not even there. I have tried changing the properties of the form and the subform, examining the related fields, and recreating the forms. It must be something related to the change to SQL server, as it works fine in access.
0
Comment
Question by:tmalmond
  • 3
  • 2
  • 2
7 Comments
 
LVL 65

Expert Comment

by:Jim Horn
ID: 40453736
>The application keeps track of requisitions and has a form for entering header information, and a subform that contains information about the line items
>when entering a new requisition, the subform does not work when entering information about the line items.

I'd start by performing step-through debugging on the Requisitions form, specifically the code that executes when header information is entered that results in creating row(s) in the line items table.

Chance are there's an 'On Error Resume Next' that is masking any errors from being displayed to the user.
Also there's a change that the line items table had an AutoNumber field somewhere, where the SQL Server equivalent is Identity(), and it wasn't created correctly, forcing the error.

Good luck.
Jim
0
 
LVL 47

Accepted Solution

by:
Dale Fye (Access MVP) earned 500 total points
ID: 40453859
Also, make sure that the tables associated with the main form all have primary keys in the SQL Server database.  I always add a field with a TimeStamp (misnomer) datatype to the tables once they are in SQL Server as well.  This field is not viewable in Access, but helps identify write conflicts when multiple users are attempting to edit the same record.

I assume you are using linked SQL Server tables?  If so, make sure you refresh the links after making the appropriate changes to the SQL Server data structures.
0
 

Author Closing Comment

by:tmalmond
ID: 40453925
That was the problem. The line item table had no primary key. As soon as I created the key and refreshed the links, it started working properly. I also created a foreign key for the linking field in the header table. I don't know if it is necessary, but it seemed like a good idea while I was creating .
0
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 40453941
Yes, having a FK in the child table is essential, don't know how you had it working in the original "all Access" version without that.
0
 
LVL 65

Expert Comment

by:Jim Horn
ID: 40454022
The upsizing must not have created any table relationships either..
0
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 40454057
Out of interest, how did you perform your "upsizing"?  Did you use the Access Upsizing Wizard, or did you use the SQL Server Migration Assistant?
0
 

Author Comment

by:tmalmond
ID: 40455781
To answer Dale's question, The original access version had table relationships. I tried using both of those methods, upsizing wizard and migration assistant. Since the original version was access97, neither would work properly. I imported the tables via excel. The largest table only had 3900 records, so it wasn't a problem. This was a simple exercise in preparation for a more rigorous one! Now that I know some of the things to look for, I am hoping that the next stages go well. My thanks to everyone who contributed.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question