Solved

Access subform not working for data entry after upsizing backend

Posted on 2014-11-19
7
344 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
[X]
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
  • 3
  • 2
  • 2
7 Comments
 
LVL 66

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 48

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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 48

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 66

Expert Comment

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

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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

705 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