Solved

Run-time error 2683

Posted on 2006-11-14
12
2,578 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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
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
 

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

749 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