Go Back   Access World Forums > Microsoft Access Discussion > General

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 04-25-2018, 07:02 AM   #1
DanielR
Newly Registered User
 
Join Date: Mar 2018
Posts: 69
Thanks: 19
Thanked 0 Times in 0 Posts
DanielR is on a distinguished road
Form doesnt open in client side

I working on a multiple form access application. On my machine, where I am developing the app all works fine. When I copy the shortcut to a client machine one of the forms that should be opening locks the application. When I go to task manager the form looks like its open.
I use the following code to open the form:
strCriteria = txtID.value
DoCmd.OpenForm "MESI Bids", WhereCondition:="ProjectID=" & strCriteriaThe form "MESI Bids" is linked to a query.
Like I said, works fine on my machine.

DanielR is offline   Reply With Quote
Old 04-25-2018, 07:11 AM   #2
ridders
AWF VIP
Gold Supporter
 
ridders's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 4,914
Thanks: 75
Thanked 1,216 Times in 1,133 Posts
ridders is a jewel in the rough ridders is a jewel in the rough ridders is a jewel in the rough ridders is a jewel in the rough
Re: Form doesnt open in client side

Try this slight variation

Code:
DoCmd.OpenForm "MESI Bids", , ,"ProjectID=" & Me.txtID
This assumes ProjectID is a number field which is part of the query used for the form record source & that txtID is a control on that form
__________________
Colin
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left and leave a comment.

New example databases:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
ridders is offline   Reply With Quote
Old 04-25-2018, 07:18 AM   #3
DanielR
Newly Registered User
 
Join Date: Mar 2018
Posts: 69
Thanks: 19
Thanked 0 Times in 0 Posts
DanielR is on a distinguished road
Re: Form doesnt open in client side

Modified the code accordingly...works on my PC but doesn't on client side.
Task manager shows that the form is open but I cant see it and the application is locked.

DanielR is offline   Reply With Quote
Old 04-25-2018, 07:19 AM   #4
MarkK
Super Moderator
 
MarkK's Avatar
 
Join Date: Mar 2004
Location: Vancouver BC
Posts: 7,572
Thanks: 10
Thanked 1,247 Times in 1,187 Posts
MarkK is a name known to all MarkK is a name known to all MarkK is a name known to all MarkK is a name known to all MarkK is a name known to all MarkK is a name known to all
Quote:
Originally Posted by DanielR View Post
When I copy the shortcut to a client machine...
Does the client machine run the file on your machine across the network? If so, that could be your problem. Each user should run the app on their own machine.
hth
Mark
__________________
formerly known as lagbolt | Windows 10 | Access 2010 | Visual Studio 2013 | "Institutions have a vested interest in perpetuating the problems to which they are the solution." - Clay Shirky
MarkK is offline   Reply With Quote
Old 04-25-2018, 07:21 AM   #5
DanielR
Newly Registered User
 
Join Date: Mar 2018
Posts: 69
Thanks: 19
Thanked 0 Times in 0 Posts
DanielR is on a distinguished road
Re: Form doesnt open in client side

The app resides on the server. I created a shortcut on the server which I copy to the clients machine. Even if I go to the folder on the server from the clients machine and I double click on the accdb file to run I get the same issue.
The application runs just this one form would not open.
DanielR is offline   Reply With Quote
Old 04-25-2018, 07:42 AM   #6
ridders
AWF VIP
Gold Supporter
 
ridders's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 4,914
Thanks: 75
Thanked 1,216 Times in 1,133 Posts
ridders is a jewel in the rough ridders is a jewel in the rough ridders is a jewel in the rough ridders is a jewel in the rough
Re: Form doesnt open in client side

Quote:
Originally Posted by DanielR View Post
The app resides on the server. I created a shortcut on the server which I copy to the clients machine. Even if I go to the folder on the server from the clients machine and I double click on the accdb file to run I get the same issue.
The application runs just this one form would not open.
If it is a split DB, the BE must be on the server.
However EACH user needs their OWN copy of the FE on their own computer
A shortcut to this on the server is at best going to have strange issues (like this one) and at some point will lead to corruption when two or more users are opening the FE at the same time

In a multi user environment, if it isn't already split, then it needs to be.
__________________
Colin
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left and leave a comment.

New example databases:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
ridders is offline   Reply With Quote
Old 04-25-2018, 07:46 AM   #7
DanielR
Newly Registered User
 
Join Date: Mar 2018
Posts: 69
Thanks: 19
Thanked 0 Times in 0 Posts
DanielR is on a distinguished road
Re: Form doesnt open in client side

OK...I do have the front and back end split. Do I just copy the front end accdb file to the users machine? Do I have to create a shortcut or let them double click on the application?

DanielR is offline   Reply With Quote
Old 04-25-2018, 07:53 AM   #8
DanielR
Newly Registered User
 
Join Date: Mar 2018
Posts: 69
Thanks: 19
Thanked 0 Times in 0 Posts
DanielR is on a distinguished road
Re: Form doesnt open in client side

I moved the app to the clients machine and ran it from there...same issue!!!
DanielR is offline   Reply With Quote
Old 04-25-2018, 07:54 AM   #9
ridders
AWF VIP
Gold Supporter
 
ridders's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 4,914
Thanks: 75
Thanked 1,216 Times in 1,133 Posts
ridders is a jewel in the rough ridders is a jewel in the rough ridders is a jewel in the rough ridders is a jewel in the rough
Re: Form doesnt open in client side

Quote:
Originally Posted by DanielR View Post
OK...I do have the front and back end split. Do I just copy the front end accdb file to the users machine? Do I have to create a shortcut or let them double click on the application?
I normally copy the entire folder containing the FE to the users' machines and create a desktop shortcut as well. If you have a network team, they may be willing to write a script that will do all of that automatically

NOTE:
1. You also need to ensure the path to the BE will be identical for each user or the table links won't work
That may possibly be why you have a problem with that form??

2. When the FE is updated, the new version will also need to be pushed out to users' PCs.
__________________
Colin
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left and leave a comment.

New example databases:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
ridders is offline   Reply With Quote
Old 04-25-2018, 07:56 AM   #10
DanielR
Newly Registered User
 
Join Date: Mar 2018
Posts: 69
Thanks: 19
Thanked 0 Times in 0 Posts
DanielR is on a distinguished road
Re: Form doesnt open in client side

Its exactly what I did...I copied the front end to the client and created a folder from which I ran a shortcut on the clients desktop. The backend points to the same location as my computer and when I open the app the data from the backend is visible.

Don't know why this form is such trouble???
DanielR is offline   Reply With Quote
Old 04-25-2018, 08:04 AM   #11
ridders
AWF VIP
Gold Supporter
 
ridders's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 4,914
Thanks: 75
Thanked 1,216 Times in 1,133 Posts
ridders is a jewel in the rough ridders is a jewel in the rough ridders is a jewel in the rough ridders is a jewel in the rough
Re: Form doesnt open in client side

Is there anything unusual about its record source?
Try temporarily disabling any code in any of the the Form events - Open / Load / Current /Activate etc
Does it work now?

Check the VBA references on the client machine. Are any shown as MISSING?

Have you compiled your database? If not do so.
If that doesn't fix it, do the reverse - try DECOMPILING your database which will remove all compile code including any corrupt code

If still stuck, the form itself may be corrupt
Try making a new copy of the form from scratch
__________________
Colin
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left and leave a comment.

New example databases:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
ridders is offline   Reply With Quote
Old 04-25-2018, 08:07 AM   #12
DanielR
Newly Registered User
 
Join Date: Mar 2018
Posts: 69
Thanks: 19
Thanked 0 Times in 0 Posts
DanielR is on a distinguished road
Re: Form doesnt open in client side

To compile -> run compact and repair or is there a compile function?
DanielR is offline   Reply With Quote
Old 04-25-2018, 08:18 AM   #13
ridders
AWF VIP
Gold Supporter
 
ridders's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 4,914
Thanks: 75
Thanked 1,216 Times in 1,133 Posts
ridders is a jewel in the rough ridders is a jewel in the rough ridders is a jewel in the rough ridders is a jewel in the rough
Re: Form doesnt open in client side

No they are different things

Compacting removes empty space left over after objects are deleted

Compiling checks the code for errors ... but first you need to ensure it will detect all errors.
Open the VB Editor and go to Tools ... Options. Tick 'Require Variable Declaration'

This will add the line Option Explicit to all new code modules from now on but it doesn't work retrospectively
Next go through EACH code module and add that as the second line - after Option Compare Database

Still in the VBE, go to the Debug menu and click Compile
If any errors are found, fix these one at a time.
The compiler will highlight the error
e.g. missing statement like Dim strText As String

Repeat until the project is fully compiled

To do the reverse (DECOMPILING) needs a different approach which is explained well in this link
http://www.fmsinc.com/microsoftacces.../decompile.asp
__________________
Colin
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left and leave a comment.

New example databases:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
ridders is offline   Reply With Quote
The Following User Says Thank You to ridders For This Useful Post:
DanielR (04-25-2018)
Old 04-25-2018, 08:26 AM   #14
DanielR
Newly Registered User
 
Join Date: Mar 2018
Posts: 69
Thanks: 19
Thanked 0 Times in 0 Posts
DanielR is on a distinguished road
Re: Form doesnt open in client side

I compiled the application...same issue.
I will try to create a new form and see if I can open it.
If that works I will build the form and test as I go.

Thanks for your help.
DanielR is offline   Reply With Quote
Old 04-25-2018, 08:30 AM   #15
arnelgp
Newly Registered User
 
arnelgp's Avatar
 
Join Date: May 2009
Location: somewhere out there
Posts: 5,989
Thanks: 54
Thanked 1,923 Times in 1,837 Posts
arnelgp is a jewel in the rough arnelgp is a jewel in the rough arnelgp is a jewel in the rough arnelgp is a jewel in the rough
Re: Form doesnt open in client side

Copy the fe to the other machine. Open the fe on that machine and Relink the Tables.

__________________
"Never stop learning, because life never stops teaching"
arnelgp is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Form doesnt open at the top of the page Yippiekaiaii Forms 1 04-08-2013 03:41 AM
Question How to make a db client-side and server-side krazykaigh General 4 06-07-2012 01:35 AM
Client side cursor improves performance? jal Modules & VBA 27 02-27-2009 03:48 AM
Form for 'Many-Side' assign 'One-Side' relationship Excel_Kid1081 Forms 1 02-26-2009 04:17 AM
Server Side Vs Client Side Queries wricoasolutions General 7 11-26-2005 07:06 AM




All times are GMT -8. The time now is 11:46 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World