auto update subform

Jackblack1

Active Member
Joined
Feb 10, 2004
Messages
266
Hello All

I have a database set up with a subform. The subform contains a list box attached to a query. What happen is that two people have to data enter ino the database at the same time in different locations. When one person enters the info in the form it should show up on the subform for both users and visa versa. How is it possible for me to have just the subform automatically update, say every 5 seconds. I know I could have it update on click, on move, etc... but I would like it to update if the user is Idle. I don't know how to incorporate the on timer feature if it possible to do. Can anyone give me an example to solve this problem, I have asked many people but no can figure it out.

Thanks
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
The form has an event on it's property sheet called "On Timer" Set that property to [Event Procedure], then within the OnTimer event, write the code to refresh the sub-form, and include the list box too.
In the "OnLoad" event of the form that is your sub-form, have a line of code that is: me.timer = 5000. (I believe 5000 is the correct number for every 5 seconds. Test it)

I believe that should do it.
If not, let me know and I'll look at it again.
 
Upvote 0
Jim,
Would have been nice to have known about the other thread. The idea of starting over when someone, Giacomo, was already helping you just is not a real good idea. Giacomo has given you very good help. The problem you are currently having is because you have coded your line incorrectly.
me.formname is not what you need.
me.sub-form-control-name is what you need.
That is why Access is telling you that "formname" is not a method or datamember, because you have the wrong name.
 
Upvote 0

Forum statistics

Threads
1,224,271
Messages
6,177,605
Members
452,784
Latest member
talippo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top