Form doesnt open in client side

DanielR

Registered User.
Local time
Yesterday, 16:38
Joined
Mar 16, 2018
Messages
72
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.
 
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
 
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.
 
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
 
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.
 
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.
 
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 moved the app to the clients machine and ran it from there...same issue!!!
 
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.
 
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???
 
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
 
To compile -> run compact and repair or is there a compile function?
 
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/microsoftaccess/performance/decompile.asp
 
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.
 
Copy the fe to the other machine. Open the fe on that machine and Relink the Tables.
 
The client machine doesn't have access on it and so I cant open the fe to relink the back end. When I open the fe I can see the be data.
 
Does the client PC have Access runtime? If not, how can the database be run on that machine?

Did you mean you can view data in the linked tables?

Did you decompile as well - it will take less than a minute
 
Its has runtime...to relink don't I have to go into the linktable manager in access. The client doesn't have access to that?
 
Is the server your machine also?
If it is you relibk in your machine using unc path and not absolute path.

\\mypc\myfolder\be.accdb
 
No, the server is not my machine and I am using the correct path for the be.
I believe the form is corrupt cause I can open other forms fine.
 

Users who are viewing this thread

Back
Top Bottom