Form:- delete and add

boumbo

Registered User.
Local time
Today, 11:45
Joined
Aug 7, 2010
Messages
44
I have a multi user database and I have split the database and then convert to MDE to distribute to my 10 users.

sometime i have to add or delete records in the background. So the front end users are affected if they have the form open.

If I delete,
If one or more users has the form open, they will see #Deleted on the form when they navigate through the form [navigation panel]

if I add,
If one or more user has the form open, they will not see the new record when they navigate through the form [navigation panel]

Is there any way i can refresh the data when the user has the form open so that when i add/delete data their form is refreshed with new data??

I have changed the refresh interval and odbc interval too to 1 sec but it does not help.

Please advise. Thanks
 
The Me.Requery command will do what you want.
 
Yes.. but how do you trigger it when the user is navigating the navigation panel clicking the button below such as one of them I <, < , > , > I? how do you attach an event to the navigation panel?
 
thanks... yes.. but how do you attach an me.requery to the navigation pane?

on_change event of the navigation pane?
 
I would just create a custom command button and put the code behind it. Maybe call the command button "Data Refresh".
 
The problem with Requery is that the user will be returned to the first record in the RecordSource of the form. If you're going to use this method, you need to 'bookmark' the current record before requerying, then return to it afterward.

To set a "bookmark" if you will (an actual bookmark isn't accurate if records are d/c'd or added) requery then go back to the same record

Where [UniqueField] is a field unique to only one record.

Where [UniqueField] is Text

Code:
Dim UF_Rec as String
   
   UF_Rec = Me!UniqueField
   Me.Requery
   Me.Recordset.FindFirst "[UniqueField] = '" & UF_Rec & "'"
Where [UniqueField]is Numeric
Code:
Dim UF_Rec as (Fill in number type here)
   
   UF_Rec = Me!UniqueField
   Me.Requery
   Me.Recordset.FindFirst "[UniqueField] = " & UF_Rec
Linq ;0)>
 

Users who are viewing this thread

Back
Top Bottom