one form - several queries

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I'm developing a database used by several people. They will use 10 forms for
performing updates. The design will be exactly the same, they're just link to
different queries.
Currently I have one form per data source. That does mean when I update the
design of the main screen, I must replace 10 forms.

I want to use only one form, and update the record data source.

I tried the following :

DoCmd.OpenForm "x_xx_udt_screen"

Forms!x_xx_udt_screen.RecordSource = "slq_oil_pm_fact_live_special_disc_late"

DoCmd.Maximize

I open my unique form x_xx_udt_screen, and update the record source. Do you
think it's a good way to proceed ? I made some tests, opened several forms
from different PC and after I got problem, apparently linked to my OLE server.

Rds
Marco
 
The one form with multiple recordsource approach you are taking is the best
way to do what you want. It would be a hassle to keep 10 forms in sync.
Your error is not related to this. What error are you getting and when?
 
Hi,

Thanks for your answer. In fact, no VBA code worked anymore. Error message :
"invalid procedure call or argument".

I tried to close my database, but it didn't work, I was not able to save,
and I finally used the task manager to close my database. Finally, a message
said "unable to reach OLE server" or something like that.

Do you thing the approach described below is able to cope with more than 2
or 3 users ?

Many thanks for your help
MArco
 
The number of users should have nothing to do with it. Is each user using
their own copy of the mdb or are they sharing a copy (always a bad idea)?

You posted the what, but not the when. Could you post the code that is not
working and which event you have the code?
 
HI,

Please find the code.

Private Sub oil_pm_fact_live_disc_late_Click()

If DCount("*", "slq_oil_pm_fact_live_disc_late") > 0 Then

DoCmd.OpenForm "u_oil_01_pm_fact_live_disc_late"

DoCmd.Maximize

Else: MsgBox "oil_pm_fact_live_disc_late empty."

End If

End Sub

In fact no VBA module worked anymore. I imported all items of this database
in a blank new one, and it worked in this new database.

The users are sharing a same copy. Why it's a bad idea ? I should set up a
database per user ?

Many thanks for your help.
Marco
 
Have you checked all your references to be sure you haven't lost any libraries?

As to why have each person have their own copy of the front end? Well, for
starters it about doubles the network traffic. All the interaction between
the desktop and the mdb has to move up and down the network, so this we not
only slow the application, but also affect the network. In addition, each
person working in an mdb will require resources from the mbd which will
further slow the application as one mdb has to accomodate several users.

Do some reading on the subject. The classic configuration for an Access
multi user application is a back end database that contains only table
objects, and a copy of the front end database on each user's own computer
linked to the back end data. The front end should contain all the other
objects. It is also a good idea to have some temporary tables in the front
end if they are only used by one user for a session to accomplish a specific
task.
 
Back
Top