How to prompt back end database to refresh when record is added to front end database? (1 Viewer)

Sampoline

Member
Local time
Tomorrow, 08:01
Joined
Oct 19, 2020
Messages
161
Here is my thought, having now seen your description of your workflow. First, just some advice. Calling out front-end and back-end users is very confusing nomenclature to us because those two terms have highly specific meanings to us that are not consistent with your description.

ALL repeat ALL of your users should only use a front-end file to use the app and the back-end file should NEVER be directly addressed. There is a serious danger of file locking issues leading to file corruption if you actually DID have a direct back-end user sharing with front-end users.

I believe what you call "front-end" is the front-end of your process and the "back-end" is just a later step in that same process. And if that is a correct interpretation, then what you have been saying makes a lot more sense, just involving misleading terms. If you actually meant front-end and back-end in the same way that we normally use them, you need to reconsider.

Now, regarding that notification that something has been added... You really don't care about what you asked. (Hear me out...)

Let's say that you have a small bunch of people entering data in the entry phase of your process. You have one person (from your description) that does validation. But which of those activities is really and truly time-critical? How often does it happen that the validation person catches up with the inputs of the data entry people? And if a new entry came in, would the validator stop the current validation immediately? Or would the validator finish that entry and move on to the next one?

I'm thinking that if you put a .Requery in the validation form's Form_AfterUpdate event (i.e. after the validator makes some entry that says "OK" and is then done with the entry), the validator would go on smoothly to the next request. Because at that point, the old record would have been updated but until you release that event, navigation and the "Current" event can't occur.

IF it happens that the validator CAN catch up, then the rest of the solution is to put a timer on the form the validator would use, but this timer would cycle ONLY if the validator has not yet "taken" one of these new records for examination.

I hope I said that clearly enough that I didn't confuse you.

EDIT: You posted just as I finished composing this. IF your multiple users are sharing database A as a non-split database, you STILL risk issues of file locking leading to terrible corruption. And if database B is a separate non-split database, again you have multiple users sharing a file with someone who is local to that DB, and that again can lead to issues.
Hi Doc,

Thanks for the response. The FE/BE explanation was probably not a good way of going about trying to explain myself, sorry. Thanks for informative reply.

I'll give your two ideas a try and inform you of the results. Thankyou.

As for the EDIT, Database A is a split database yes. And Database B will usually only have 1 user but on some occasions 2. No more. But it's not split, will this be okay?
 

Sampoline

Member
Local time
Tomorrow, 08:01
Joined
Oct 19, 2020
Messages
161
you must test it.

i created autoexec macro on FE, so it will open frmHidden when
FE starts.
note table1 is a Linked table to BE database.

first step, relink table1 on FE to BE database.
make a second copy of FE. renaming the second copy as FE2.accdb
so you can run it both on your computer.

if you are in a network much better test environment.
i updated the code of frmHidden so it will not show
message if "you" are the one who make changes to
the table.
if another user add/delete a record, you will be prompted
to refresh it.

right now, it is manual refresh.
Hi Arnel,

Just been receiving a run time error using the sample. I've added the screenshots below:

Thanks.


1605576014877.png


1605575954431.png
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 06:01
Joined
May 7, 2009
Messages
19,237
use the last file i uploaded.
unzip them all in one folder and relink the FE.
make sure you "Enable Content" of the Security Warning.
 

Sampoline

Member
Local time
Tomorrow, 08:01
Joined
Oct 19, 2020
Messages
161
use the last file i uploaded.
unzip them all in one folder and relink the FE.
make sure you "Enable Content" of the Security Warning.
Yep I did all of this, but received the error for some reason.

EDIT: so i just deleted the file and re downloaded the zip.. it works for now lol.. not sure what happened, but as long it works hey
 
Last edited:

Sampoline

Member
Local time
Tomorrow, 08:01
Joined
Oct 19, 2020
Messages
161
use the last file i uploaded.
unzip them all in one folder and relink the FE.
make sure you "Enable Content" of the Security Warning.
So I've done everything. And I saved it on a network location where I asked another user to add some records to the FE. But I didn't receive any message box to refresh my records in the BE?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 06:01
Joined
May 7, 2009
Messages
19,237
did you both open Table1 form?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 06:01
Joined
May 7, 2009
Messages
19,237
just tested it and it is prompting the FE when i add/delete
record directly from BE database.
 

Sampoline

Member
Local time
Tomorrow, 08:01
Joined
Oct 19, 2020
Messages
161
just tested it and it is prompting the FE when i add/delete
record directly from BE database.
Oh, so I wanted it to work the other way around. FE user inputs data, BE user is prompted of addition/deletion.

Is it not possible for it to function this way?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 06:01
Joined
May 7, 2009
Messages
19,237
oh, i see.
you need to Copy From FE to BE:

frmHidden, form
autoexec macro
and clsOpenForms

also create on BE a Form for your Table to "monitor".
after all is done. close and re-open the BE.
open the "form" that you created form "monitoring".

of course you need to open the FE on your pc/other pc
to see if it will work.
remember the timer is 3 seconds (before it is triggered).
 

Users who are viewing this thread

Top Bottom