Solved

Run-time error 2683

Posted on 2006-11-14
12
2,570 Views
Last Modified: 2008-02-26
I have an Access 97 polling database that I split and made changes to.  It all seems to work fine from my PC which has the entire access package loaded.  However any pc with the run-time version is giving me the following errors when I try to poll.  I can view things and run reports, just not poll on the run-time PC's.  Any suggestions?
Run-time error 2683
Execution of this application has stopped due to run-time error
Field lock Trans.Patron can't be zero length string.
Index on primary key can't contain null value.
0
Comment
Question by:BobRosas
  • 6
  • 2
  • 2
  • +1
12 Comments
 
LVL 7

Expert Comment

by:Imoutwest
ID: 17939225
Error 2683 - There is no object in this control.

Seems that you have created an index on a field/control that has empty data in that control.

Open your backend and look at your table and see if this is true and correct the Null values.
0
 

Author Comment

by:BobRosas
ID: 17939401
I only changed two tables and can't find a problem in either one but I'll keep looking.  However, I forgot something else important.  The database I split was polling and working daily before I split it.  After I split it I added my front end with the new code to the old backend with the current data.  Because of that I noticed that the references didn't match so I fixed that but I'm still getting the same errors.

I did add several new fields in my code but I also updated the split backend with those fields and populated them with zeros.
0
 
LVL 7

Expert Comment

by:Imoutwest
ID: 17939487
Front-End is your queries, forms, reports, etc.?
Back_End is just your tables?

Is it possible that the tables are not linked correctly between the backend and front end? Re-Link or delete the linked table in your front-end and then re-link the table from scratch. Other than that this is beyond my experience, hopefully one-of the experts will jump in. Sorry I couldn't help more, Imoutwest
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 17939488
to me this message

Field lock Trans.Patron can't be zero length string.

is saying that the field Patron in the table  lock Trans  has the setting of Allow Zero Length to False (open up table in design view in backend)
If u set this to True, what happens?

this is also what Imoutwest has said
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 17939496
If u change the table definition, check the frontend, though u cant make changes u can see the field properties. U may need to relink this table
0
 
LVL 54

Accepted Solution

by:
nico5038 earned 500 total points
ID: 17939551
Hmm, did you check the references on those other PC's ?

Add this (slightly modified) function cactus_data wrote and activate it from e.g. an additional button:

Public Function ReferencesClean() As Boolean

' Remove all missing references.
' Return True if no reference was broken.
'
' 2001-08-20. Cactus Data ApS, CPH.

  Dim ref         As Reference
  Dim lngItem     As Long
  Dim booMissing  As Boolean
 
  With References
    For lngItem = .Count To 1 Step -1
      Set ref = .Item(lngItem)
      If ref.BuiltIn = True Then
        ' No need to check built in reference.
      ElseIf ref.IsBroken Then
         MsgBox "Missing ref: " & ref.Name
      End If
    Next
  End With
 
  Set ref = Nothing
 
  ReferencesClean = Not booMissing
 
End Function


Also make sure no code is executed before this.

Nic;o)
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 

Author Comment

by:BobRosas
ID: 17939705
The code did not find any missing references.  

I would like to add that I was mistaken in saying all the full versions work.  It appears only mine is working.  When I tried the code on another full version machine I got...
Run-time error '-2147024890(80070006)' Method 'WriteString' of object 'lPortCtl' failed
Debug goes to the code
Sub SendMsg(PXstr As String)
    InfoMsg "Send: " & StrDump(PXstr)
      PortObj.WriteString PXstr
End Sub
FYI - This is not my program.  I've only made a few changes.  I'm trying to go thru the code now and figure out where 'WriteString' comes from.
0
 

Author Comment

by:BobRosas
ID: 17939760
rockiroads
I didn't see your comments earlier.  I am checking that out as well.
Thanks
0
 

Author Comment

by:BobRosas
ID: 17940302
rockiroads
I tried changing Allow zero Length to true and it didn't make any difference.
I also tried re-linking all the tables, nothing there either.
followed by
Run-time error '-2147024890(80070006)' Method 'WriteString' of object 'lPortCtl' failed
Debug goes to the code
Sub SendMsg(PXstr As String)
    InfoMsg "Send: " & StrDump(PXstr)
      PortObj.WriteString PXstr
End Sub
0
 

Author Comment

by:BobRosas
ID: 17940801
I just found that in the above code PXstr = AT&F in both machines but in my machine it is followed with a box for the carriage and in one of the PC's not working it's a vertical solid bar.  Could that be the problem?   Is there a way to change the bar to a box?
0
 

Author Comment

by:BobRosas
ID: 17941804
I think the references fixed it.  What happened is the software for the modem on the machine I was testing wasn't working.  The other run-time machines work fine now.
Thanks
0
 
LVL 54

Expert Comment

by:nico5038
ID: 17941985
Glad it's solved, success with the application !

Nic;o)
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
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…

708 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now