Alpha DevCon 2018
Results 1 to 3 of 3

Thread: Why does recno display on my forms?

  1. #1
    Member
    Real Name
    Mark Gallagher
    Join Date
    Feb 2017
    Location
    Sarasota, Florida
    Posts
    27

    Default Why does recno display on my forms?

    Background:
    I have a few forms that a programmer added a text object called TEXT2
    that is used to display system value recno. It was probably added for
    debug purposes and never removed.

    Here's a code sample on how it is updated with the system value recno:

    text2.text = str(recno()) 'Display recno on form

    I have been tasked with removing all the code associated with displaying recno on the forms.

    So, I have gone thru all the code found in the form buttons and commented out
    all the code that references TEXT2 and recno, but I must have missed
    something because TEXT2 will get updated with recno when, for example,
    returning from a browse program back to the form or when the form is
    opened it will display the digit 1 .

    Question:
    What have I missed for recno to continue to display on the form when I have
    commented out all the code associated with it? What could possibly be updating it?

  2. #2
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    24,844

    Default Re: Why does recno display on my forms?

    I have gone thru all the code found in the form buttons
    There are other events than the onpush of buttons. Open the form in design mode, use the Form menu choice, Events, and see which appear in bold. Those have code associated with them. Select each and the code will be shown and can be edited.

    Most likely the onfetch event, possibly the oninit and onactivate.
    There can be only one.

  3. #3
    Member
    Real Name
    Mark Gallagher
    Join Date
    Feb 2017
    Location
    Sarasota, Florida
    Posts
    27

    Default Re: Why does recno display on my forms?

    Hi Stan -

    That is exactly what is going on! (UR Awesome)

    I found the code that was haunting me at Forms > Events > OnActivate

    text2.text = str(recno())

    And OnActivate was checked and in bold characters just as you described.

    Thanks again for your help ... Mark :)

Similar Threads

  1. Images won't display on forms
    By seaken64 in forum Alpha Five Version 8
    Replies: 7
    Last Post: 06-17-2009, 03:51 AM
  2. How to display Recno() on a form?
    By Sandy Garrett in forum Alpha Five Version 4
    Replies: 2
    Last Post: 04-20-2007, 03:25 PM
  3. Display 2 forms
    By dik_coleman in forum Alpha Five Version 5
    Replies: 2
    Last Post: 07-17-2004, 04:43 PM
  4. Change display message at top of forms?
    By Fred Daniel in forum Alpha Five Version 5
    Replies: 2
    Last Post: 11-30-2003, 11:30 PM
  5. filter forms reports display
    By vasant panjabi in forum Alpha Five Version 4
    Replies: 1
    Last Post: 08-24-2000, 06:45 PM

Posting Permissions

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