UtterAccess.com
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
> Like Operator Working In Accdb Not In Accde, Access 2016    
 
   
rusty1969
post Sep 11 2019, 05:17 PM
Post#1



Posts: 21
Joined: 11-March 18



So I'm back with an extended problem from my post the other night. There was another purchased database update that is causing errors in my access 2016 database at work. I was able to fix the accdb file so that it no longer throws a few errors, but when i save it as an accde one of the errors is still there. this is the code:

If Me.EndUserInfo Like "*/*" Then
MsgBox "You cannot use a /slash/ try using a dash instead.", vbOKOnly, "Project DB"
End If

That works in the accdb but not in the accde. I tried to change it to:

If Me.EndUserInfo = "*/*" Then
MsgBox "You cannot use a /slash/ try using a dash instead.", vbOKOnly, "Project Master"
End If

and there is no error. So it looks like it doesnt like LIKE! Which this has run fine for over a year. Also, I can remote into my work machine... i saved the accdb as accde at work - error. i saved the accdb on home machine - no error! I open, save as, that's it... no other changes, and one has error, one doesnt. What could be different!!
Go to the top of the page
 
GroverParkGeorge
post Sep 11 2019, 05:20 PM
Post#2


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


It usually helps to see the actual error number and error message. What are they in this case?


--------------------
My Real Name Is George. Grover Park Consulting is where I do business.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
 
rusty1969
post Sep 11 2019, 06:31 PM
Post#3



Posts: 21
Joined: 11-March 18



Sorry, attached is snip of error...
Attached File(s)
Attached File  error.JPG ( 25.33K )Number of downloads: 13
 
Go to the top of the page
 
GroverParkGeorge
post Sep 11 2019, 07:33 PM
Post#4


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


That suggests there is a control on a form in which you have entered something in the BeforeUpdate property. Whatever it is, it doesn't resolve to the name of an actual executable event.

Look for something like this in all of the forms.

Attached File  BeforeUpdateEvent.PNG ( 9.88K )Number of downloads: 4



--------------------
My Real Name Is George. Grover Park Consulting is where I do business.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
 
rusty1969
post Sep 11 2019, 08:11 PM
Post#5



Posts: 21
Joined: 11-March 18



the above code i gave is the before update:

If Me.EndUserInfo Like "*/*" Then
MsgBox "You cannot use a /slash/ try using a dash instead.", vbOKOnly, "Project DB"
End If

it compiles clean. again, it works in the accdb, not in the accde. and creating the accde on my home pc - with 32 bit Access 2016 - will not give the error. but creating the accde on my work pc - with 32 bit access 2016 - will give the Before Update error.

?
Go to the top of the page
 
HansUp
post Sep 11 2019, 08:52 PM
Post#6



Posts: 53
Joined: 19-September 14
From: Colorado USA


Seems odd that Access would object to that Like expression. However, check whether you have better luck using InStr instead of Like to check for the presence of a slash.

CODE
If InStr(1, Me.EndUserInfo.Value, Chr(47)) > 0 Then
    MsgBox "You cannot use a /slash/ try using a dash instead.", vbOKOnly, "Project DB"
End If

This post has been edited by HansUp: Sep 11 2019, 08:53 PM
Go to the top of the page
 
GroverParkGeorge
post Sep 11 2019, 09:05 PM
Post#7


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


Given the fact that the accde created from the exact same accdb on a different computer doesn't raise the error, I have to suspect the installation of Access on that particular computer.

Try repairing your Office installation. And if that doesn't resolve the problem with the accde created from this accdb, then try uninstalling and reinstalling Office.


--------------------
My Real Name Is George. Grover Park Consulting is where I do business.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
 
rusty1969
post Sep 11 2019, 09:32 PM
Post#8



Posts: 21
Joined: 11-March 18



I just tried the instr instead of like... still same error. and, I had our IT company do a full re-install of office on monday to try to fix. i'm really freaking out, because i've been vocal about access being a good option for us and that corruption would not occur. and here i am, it seems like its corrupt! or its just something in my registry or windows that changed when the IT company installed the update of this other database. here is recap from other day's post...

"I have an Access database at work, Access 2016 front end, SQL server backend. All was right in the world. We have an outside IT company that supports our company. They recently upgraded the version of another purchased database (BillQuick 2019). After they gave us the go ahead to resume after that "update"/"new version", my Access 2016 database is throwing errors without any code changes at all. Very simple lines of code using such things as "like" "instr" etc. throw errors like #func! and "out of memory". I made a copy of the database, converted all the tables to local tables, and ran on my computer at home and there are no errors, everything works great.

My first check on my work computer was the references, and they are all there, none are "missing". I also created a new database, imported all forms, queries, etc to start fresh, that didn't work either.
I asked the IT company to re-install microsoft office. Any ideas of what to ask them to check next? (the IT company has it all locked down, so it's very hard to troubleshoot with my privileges). i don't want them to start using the word "corruption". My feeling is that if no code has changed and it works fine on my home computer, it's not corrupted?

Can something have happened with the references? something in the registry? i know this is difficult because I don't know what they changed for this other database update -- they said that "nothing else needed to be changed" to update it. It's also a SQL backend. My database does use three tables from it, but i repointed the dsn, and linked the three new tables and all seemed 100 percent normal. and even the converted "local" table database throw errors on my work pc, but works at home. so i feel like i ruled out SQL and ruled out the code itself. ruled out the lack of a selected reference. feels like something wrong with the dll of the reference???? maybe?
"

the solution was that i made a new database on my home computer, imported all objects, then saved that on work computer - that fixed the accdb file to have no errors and compile. however, i then realized that there were still errors in the accde file.

I just don't know.
Go to the top of the page
 
GroverParkGeorge
post Sep 12 2019, 08:19 AM
Post#9


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


All of this points to a change in your computer's environment made when that other database application was installed. I do not believe in ghosts and I do not believe in "spontaneous self-destruction of software", although the latter may not be entirely impossible.

Tell us more about this BillQuick 2019 application. Is it Access based? Did it replace dlls on your computer during its install? Does it also link to SQL Server tables? And so on.

--------------------
My Real Name Is George. Grover Park Consulting is where I do business.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
 
cheekybuddha
post Sep 14 2019, 12:47 PM
Post#10


UtterAccess VIP
Posts: 11,691
Joined: 6-December 03
From: Telegraph Hill


Check that the offending machine does not have the 'use ANSI compatible SQL' option selected.

I'm on my phone and can't check exactly where to find it. It's somewhere in database options. George will probably know where to locate it.

A long shot, but worth eliminating as a possible cause.

hth,

d

--------------------


Regards,

David Marten
Go to the top of the page
 
rusty1969
post Oct 9 2019, 03:44 PM
Post#11



Posts: 21
Joined: 11-March 18



Hi there. Just wanted to post an update to this as I figured out what was going on yesterday. Apparently something in the update changed my default language to Korean! I set my Access default language to use English and poof... i now reads LIKE

just in case this happens to someone else!
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    18th November 2019 - 05:07 PM