Solved

Can't access records in ADP

Posted on 2004-08-16
9
461 Views
Last Modified: 2013-12-05
Hi all,
    I have attempted to transfer my MDB into an ADP running on SQL Server. In the process, I managed to get all the data working after a while but my forms are not working properly. I have a form that contains multiple subforms. Form A (my primary form) has subforms (Form B, C, etc.). The table for Form A is Table A. For Form B, it is Table B, and so on. The tables are connected by a 1-to-1 or a 1-to-many relationship. They all reference Table A's primary key for the relationship.
    I am holding information of people in these tables, so Table A has their personal information such as address, etc. Table B has property they own, etc. Table C may have answers from a survey they have filled out. However, a person in Table A may not have a record in Table B because they do not have any property. Additionally, they may not have filled out a survey, so they do not have a record in Table C.
    Now my problem presents itself. All the relationships are set up nicely, etc. If you open up the form and scroll through the records, they all have the correct information in the subform. However, if you come to a record without any record for Table B or C, you get an empty subform. You cannot create a new record either. All the recordset navigation buttons are greyed out. However, on some of the subforms you can see the subforms and the navigation buttons are not greyed out. Can someone please tell me why? I know that in Access, the next record is "created" for you if you have no information and SQL Server does not do that. Is this the problem? How do I solve it? Thanks so much guys.
                   Sincerely,
                         JL
0
Comment
Question by:jl_forum
9 Comments
 
LVL 36

Expert Comment

by:SidFishes
ID: 11816987
after upsizing you must make sure every table has a primary key defined...this is usually the cause of not being able to add records

have a look at your tables and define one if it doesn't exist.
0
 

Author Comment

by:jl_forum
ID: 11823589
Hi Sid,
    I did do that and it seems as if problems seem to exist regardless of whether a key is there. This problem really only occurs on two subforms. I don't quite understand why. One of these subforms only shows the contents of the subform if they have a record. The other subform doesn't show anything regardless if they have a record or not. Any ideas?
            Sincerely,
                  Jon
0
 
LVL 50

Expert Comment

by:Steve Bink
ID: 11832306
Can you open the subform in regular form view (as opposed to opening it as a subform in the main form) and see records?  Have you tried to rebuild the form?  Do you use any third-party controls, or graphics controls?
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 36

Expert Comment

by:SidFishes
ID: 11832427
had a thought...do you have your pk's set up to be an INT with autoincrement enabled?...or are you creating them with code

this might make a difference?...
0
 
LVL 44

Expert Comment

by:GRayL
ID: 11835687
Try: Properties of SubForm - Data Tab - Enabled: Yes, Locked: No
0
 

Author Comment

by:jl_forum
ID: 11836805
Hi guys,
   Thanks for all the comments! I tried opening the subform in regular view and its okay. I didn't rebuild the form but then again, I don't think its a problem with the form. No third-party controls are involved. This is a simple Access-driven subform (well... at least this part of it is). The primary keys are created automatically. No code is involved here. The pk's used to be autonumbering (random because of synchronization), but since it is now SQL Server, it autoincrements as far as I know. As for the subform tab data, it is enabled and everything seems good to go.
    One thing that I failed to mention that is may be of some use. When I open the main form, I get the error "Syntax error or access violation". However, the form opens up afterwards. Functionality-wise, there doesn't seem to be too much of a difference. It functions like it did before with the exceptions of the problem I said. Looking at routinet's comment, I tried to place an additional subform on the main subform (with the problem subform being the control source). I got the same blankness, however, I also got this error upon trying to just add a subform to the form: "Your code contains a syntax error, or a Microsoft Access function you need isn't available". I assumed this is the same error it is referring to when I try to open the form. Now, when I open the form, I get the "Syntax error or access violation" and I also get "Line 1: Incorrect syntax near ';'.". The subform does not have any VBA code either... what gives?? Please help!!
                 Sincerely,
                         JL
0
 

Author Comment

by:jl_forum
ID: 11837039
Hey guys, I found something. I changed the control source of that subform to something else and I seemed to fix it. Before it was a query to fill in a label while opening it. I think that solved it, as I can see it now... as for the other subform... I can see it but no records show up still.... Thanks for your help!
              JL
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 12665034
Closed, 125 points refunded.

modulo
Community Support Moderator
Experts Exchange
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
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…

713 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