Printable Version of Topic

Click here to view this topic in its original format

UtterAccess Forums _ Access Runtime, Packaging & Deployment _ Strange Error

Posted by: ClaudioHenriques Jul 22 2019, 06:52 AM

I have an application developed in Access 2010 with front and back end running on Windows network. In certain stations one error is verified and in others not. The runtime for all is the same version 2010. The only thing I noticed is that where the error occurs is a Windows 64 BITS. would it be this? Is there a way to solve it?

Code: .......................................................

Dim x, y, z, ano
Dim rst As DAO.Recordset

Me.AllowAdditions = True
Me.AllowEdits = True
DoCmd.RunCommand acCmdSaveRecord

Set rst = CurrentDb.OpenRecordset("tbEmpreendimentos")
rst.MoveLast
ultimanum = rst("SeqLocal")
x = Right([ultimanum], 8)
y = Left(x, 3)
z = y + 1
w = Date
ano = Right(w, 4)
zlen = Len(z)

If zlen = 1 Then
novonum = "DPOSE." & "00" & z & "." & ano
ElseIf zlen = 2 Then
novonum = "DPOSE." & "0" & z & "." & ano
ElseIf zlen = 3 Then
novonum = "DPOSE." & z & "." & ano
End If

DoCmd.GoToRecord , , acNewRec
Me.Processo = novonum
Me.CboTipoProj.SetFocus

................................................................................
...................


create a new record by adding one in the document number.It works correctly in all memos stations in which I commented ... error on screen print screen attached


 

Posted by: Phil_cattivocarattere Jul 22 2019, 08:18 AM

It is a bit difficult to understand the error, I do not understand Spanish (if it is Spanish)
Do you have Option Explicit in every module? I see variables that are not declared.
Why do you move to last record?Declare the type (even it is Variant)

CODE
Dim x As Integer, y As Integer, z As Integer, ano As Integer
If you want to get Year from Date, write this
CODE
w = Date
ano = Year(w)
zlen can be 1, 2 and 3 only? Never something different?
What does ultimatum variable contains?
It would be very usefull do see whole code.


Posted by: GroverParkGeorge Jul 22 2019, 09:14 AM

It looks like Portuguese, I think. To me, the error message--so far as I understand it--suggests there is a missing reference. At least that's the kind of error it resembles.


Posted by: ClaudioHenriques Jul 23 2019, 12:43 PM

Thanks for the answers. Sorry for the attachment, it is the Portuguese language.

Anyway the code works on 8 microcomputers on the Windows network with the 2010 runtime smoothly.

Only in 2 microcomputers, which I don't know if that's why, they are 64-bit windows system, simply clicking the button nothing happens ... In other microcomputers (8) that are 32 bits, I don't know if that's why, everything works 'OK'.

I made a small example of this attachment .... I changed the recordset taking with dlookup the last record.

I will try to install the runtime again and test with the runtime version 2013 ...

 Database.zip ( 36.54K ): 3