If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Initiate VB code remotely
Hello!
Today i am using a timer function to check a value in an text box at a form. I ex: If me.tbx_1 = "yes" then 'do something useful end if The tbx_1 field is bound to a table which i can update remotely. This timer function runs continuesly trough the day on all computers. Every time the code runs, ex every 10000ms, it hangs the form for a short period of time. My question is, is there any other way to make Access initiate code from å remote computer? |
#2
|
|||
|
|||
Initiate VB code remotely
hi,
Eirik wrote: Today i am using a timer function to check a value in an text box at a form. Why don't you use the After Update event of that control? This timer function runs continuesly trough the day on all computers. Every time the code runs, ex every 10000ms, it hangs the form for a short period of time. Obviously the "'do something useful" part needs CPU cycles while it's executed. My question is, is there any other way to make Access initiate code from å remote computer? Basically, yes. But this strongly depends on your actual problem you're trying to solve. mfG -- stefan -- |
#3
|
|||
|
|||
Initiate VB code remotely
If i use the afterupdate event it is the user at computer 1 that needs to
make a change to the record. My situasjon is that computer1 has a field1 bound to table1. On computer2 i make a correction to the value at field1 in tabel1 and it shows the new value on computer1's form. It is not 'do something usefull' which uses CPU cycles. It is the timer event which is continuesly running in the background to check the IF statement. Basically i would like to initiate VB code at Computer1 from Computer2. The code could be something like docmd.quit or docmd.openform "new message" or things like that. If i use the Timer event to check for a value in the table or form it uses cpu cycles. I want to find another way to initiate code |
#4
|
|||
|
|||
Initiate VB code remotely
Here is an example
Private sub form_timer() dim rst as new adodb.recordset with rst .open "SELECT * from [table1]",currentproject.connection, adopenforwardonly, adlockreadonly If !field1 = "somevalue" then 'do something useful end if .close end with set rst = nothing end sub |
Thread Tools | |
Display Modes | |
|
|