X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
   Reply to this topicStart new topic
> Strange Error, Access 2010    
post Jul 22 2019, 06:52 AM

Posts: 101
Joined: 9-August 16

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")
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


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

Attached File(s)
Attached File  Sem_t_tulo.jpg ( 305.98K )Number of downloads: 23
Go to the top of the page
post Jul 22 2019, 08:18 AM

Posts: 368
Joined: 2-April 18

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)
Dim x As Integer, y As Integer, z As Integer, ano As Integer
If you want to get Year from Date, write this
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.

Please forgive in advance my horrible English.
Go to the top of the page
post Jul 22 2019, 09:14 AM

UA Admin
Posts: 36,165
Joined: 20-June 02
From: Newcastle, WA

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.

My Real Name Is George. Grover Park Consulting is where I did business for 20 years.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
post Jul 23 2019, 12:43 PM

Posts: 101
Joined: 9-August 16

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 ...
Attached File(s)
Attached File  Database.zip ( 36.54K )Number of downloads: 3
Go to the top of the page

Custom Search

RSSSearch   Top   Lo-Fi    6th December 2019 - 08:46 AM