Some forms don't open

Hanz

Registered User.
Local time
Today, 15:27
Joined
Aug 9, 2018
Messages
25
I just finished my project and it works well from my laptop and in my desktop. when i distributed it to other desktop some of my forms don't open using the button that i placed with just a simple docmd.openform. one more weird thing is that i also have a form with a subform and the subform doesn't show in that particular computer only. I already set the the folder where i saved the file as trusted location. I don't think something is wrong in my codes because it works well in my desktop.



in addition, I already set the references on my vba the same as what i have on my desktop. so i also don't think i missed to enable some references in order for some object to work.


Maybe i miss something that i don't know.
 
So what's different about the problem PC?
Different versions of Windows / Access? 64-bit rather than 32-bit?

On the problem PC, do the following:

Check none of your references are marked MISSING

Check you have set Require Variable Declaration = True in VBE Options
Then check you have Option Explicit as the second line in EACH code module
Then check your database compiles
 
I compile and was compiled with out errors. in my desktop the macro is not enabled so i also didn't enable in the pc with problem. the project only have tables, queries, forms and module. no macro used. I saved the project_fe in the desktop and i add its desktop as trusted location. the codes of this form have option explicit on top.
 
That also seems to indicate there are no missing references or API issues

Try decompiling the FE in case you have any corrupt code.
Then recompile & compact.
 
Yes some forms and buttons works fine. I only have two buttons that will open a form that don't trigger the openform command.



also only one form with subform that does not show the subform. the subform is not empty, i open the subform outside the parent form and does show the data that i wanted.
 
I may be wrong but the OP suggested only SOME forms were an issue.
Therefore that suggests SOME code is working i.e. the project is trusted???
Sorry, I'll shut up, but it was only a suggestion that would not take a long time to check.
 
Apologies. It wasn't intended as a put down.
Anyway I'm now completely out of ideas if decompiling doesn't work
 
I haven't tried to decompile yet but i will try
 
Try this: on the suspect computer open a new database. From the ribbon use external data, pick Access database. Browse to the problem database, import everything into the new database.

Compile it and do a compact and repair.
 
That should really only be done after trying decompiling.
Otherwise, if there is any corrupt code, you risk just transferring it to the new database
 
That should really only be done after trying decompiling.
Otherwise, if there is any corrupt code, you risk just transferring it to the new database
Not sure the relevance since the newly created DB can simply be deleted.

You still have the original DB untouched.
 
Of course you do but why take the risk. Decompile first.
In my experience it usually fixes issues of this kind so that copying to a new database isn't needed.
 
I decompile but with no luck. I have no option but to re-create that form on that PC. I rename the form to "formname_old" and i just copied everything to another form and it solve my issue. can't really figure out why that happens to that particular PC.


Thanks to those who shared their ideas on this.
 
Glad you got it working.
Sometimes you just have to accept it as one of those things and move on ....
 

Users who are viewing this thread

Back
Top Bottom