split database sync data issue

siamandm
BronzeLounger
Posts: 1267
Joined: 01 May 2016, 09:58

split database sync data issue

Post by siamandm »

Hi

i noticed one thing on the split database, when working on network and modify a data inside on of the field of a form ... it will not reflect on the other side until i close the current form

how to make it dynamically reflect the changes...?

regards

User avatar
HansV
Administrator
Posts: 78620
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: split database sync data issue

Post by HansV »

Keep in mind that if user A is editing a record, user B won't be able to see the changes until the record has been saved, for example because user A moves to a different record or closes the form.
The frontend updates the data according to the Refresh interval specified in File > Options > Client Settings > Advanced. The default setting is 60 seconds, so user B may have to wait a bit after user A has saved a record to see the changes.
S1679.png
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans

CData
3StarLounger
Posts: 308
Joined: 24 Dec 2015, 16:41

Re: split database sync data issue

Post by CData »

In addition to Hans reply; and to clarify the post; the record in the table will update when the screen form's record advances - not just when the form closes. So that if you go to another record with the same form, the record one exits is writing to the table. This is of particular note for continuous forms.

One can also force the write to the table in any event, such as exiting a field with: Me.Dirty=False

siamandm
BronzeLounger
Posts: 1267
Joined: 01 May 2016, 09:58

Re: split database sync data issue

Post by siamandm »

thanks alot for the replies...
is this recommended to reduce the refresh interval or its better to leave it as its ?

regards

User avatar
HansV
Administrator
Posts: 78620
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: split database sync data issue

Post by HansV »

You could reduce it a bit, for example to 30 seconds. But don't make it shorter than that - that would have a negative impact on performance.
Best wishes,
Hans

siamandm
BronzeLounger
Posts: 1267
Joined: 01 May 2016, 09:58

Re: split database sync data issue

Post by siamandm »

thanks a lot Hans,

regarding CData reply, where should i have to put the me.dirty=flase

regards

User avatar
HansV
Administrator
Posts: 78620
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: split database sync data issue

Post by HansV »

If you want to create a command button that saves the current record, so that others see the changes, you could use that line in the On Click event procedure.
Best wishes,
Hans

siamandm
BronzeLounger
Posts: 1267
Joined: 01 May 2016, 09:58

Re: split database sync data issue

Post by siamandm »

aha, ok so in this case it will be nice to have Save and Undo changes button ,
for save button on click event i will put
Me.Dirty=False

and for Undo Change button click event
me.dirty= true

is this correct?
and if i have subfrom in side the main form what should i dot please?
regards

User avatar
HansV
Administrator
Posts: 78620
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: split database sync data issue

Post by HansV »

No, for undo use Me.Undo

You could create a separate button on the subform.
Best wishes,
Hans

CData
3StarLounger
Posts: 308
Joined: 24 Dec 2015, 16:41

Re: split database sync data issue

Post by CData »

I advise against the 'Save' concept. A Windows application is tightly coupled and so it is constantly saving automaticly when you advance records, close the form, etc. No explicit Save is needed - - so one shouldn't go out of their way to invent it.

I realize many are accustomed to the Save idea - particularly in web apps where data is not tightly coupled. The conceptual flaw in Save is that the human error probability is the same ie. forgetting to press Save versus Saving something that should not be - - so why go to the trouble/cost of writing a Save method.

That's my soapbox speech on this topic.

User avatar
HansV
Administrator
Posts: 78620
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: split database sync data issue

Post by HansV »

I agree that there is seldomly a good reason for providing a Save button in Access. A record will be saved automatically when the user moves to a different record or when the form is closed.
Best wishes,
Hans

siamandm
BronzeLounger
Posts: 1267
Joined: 01 May 2016, 09:58

Re: split database sync data issue

Post by siamandm »

thanks for you all