Results 1 to 5 of 5
  1. #1
    melhado
    Guest

    Tiggering code without form entry (2K SR 1)

    I have some flags that are set in checkboxes, the true/false setting of each being set by another program acting as a data collection agent -- it is reading instruments, and then sending the data to my Access app. If a reading falls out of spec, these flags are set directly in the table. The record is opened by my form, and setup and close down data entered in this same form; the data collection app is in between.

    When checked, they trigger the appearance of labels acting as Notices on my Access form. I initially put them on the Current, and they show when focus leaves and comes back. However, I need them to be visible as soon as possible after the flags are set to true. The checkboxes are hidden controls, so Focus is never there, nor are they ever updated or changed -- just the underlying field is.

    To get this to happen, which event does not need action on the control, but will tell the form the record has changed and to react to the code to set the labels? I thought AfterUpdate might do it, but cannot tell if it wants the form to do the updating or will react to changes made to the underlying record, almost immediate.

    Any ideas would be appreciated

    'dave

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Tiggering code without form entry (2K SR 1)

    I don't know how you can trap the changing of a record behind the form.
    What you can do is use the on timer event of the form to refresh or repaint every x seconds

    Hope this helps
    Francois

  3. #3
    melhado
    Guest

    Re: Tiggering code without form entry (2K SR 1)

    That would do the trick. It is just for the operator to see that a critical error occured, and to take action sooner.

    Will this work if the form in question (and its underlying table) is a subform? Do II set the TimerInterval property on the mainform or sub?

    thanks

    'dave

  4. #4
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Tiggering code without form entry (2K SR 1)

    As a subform is a control of a form, if you refresh the form, the subform will be updated.
    I just read the help file about Refresh.
    There is a refresh interval in the options tab advanced. This would be an interval for automatic refreshing windows.
    Maybe you only need to put a smaller intervall in this option.
    Francois

  5. #5
    melhado
    Guest

    Re: Tiggering code without form entry (2K SR 1)

    Good point. I set the interval and put the refresh code on the subform and it seems to work right. The record kept going back to the first in the subset in each Timer Interval. Apparently there is no need to Refresh the recordset, every Interval it just reads the code, and does what its told. It does seem that the record needs to be saved or moved off before it actually sees the record. Any way around this? Have tried to save the record at the end of code, but it doesn't seem to help.

    Any advantage to moving it to the main form?

    I think the setting in the options tab is for the copy of Access at the developer's desk, not the copies running it. At least that is what I found with the settings for where the cursor should land in a cell, or whether it selects it. I don't think it carries over.

    There are some examples in the Access Developer's Hbk that illustrate functions that can be inserted into the app to make that stuff happen in the users copy, regardless of settings, and then return them on quitting the app.

    thanks

    'dave

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •