Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Feb 2003
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Highlight current row (2002)

    I have a very simple continuos form that I want to have the selected row highlighted. I set up conditional formatting for each textbox and that works well, but it only formats the active textbox. I also want to apply the formatting to the adjoining textboxes on the same row only. I thought I had done this once before using the controls FormatConditions in the Form_Current() event, but I can't seem to find the code. Any help would be appreciated.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Highlight current row (2002)

    See the thread starting at <post:=680,964>post 680,964</post:> and the database attached to <post:=382,292>post 382,292</post:>.

  3. #3
    2 Star Lounger
    Join Date
    Feb 2003
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Highlight current row (2002)

    Edited by HansV to reduce picture in size - please don't post pictures larger than 640 x 480 pixels.

    I downloaded the database you referred to in post 680,964. I don't know what I'm doing wrong, but I can't get it to work. Since I'm using 2002, I tried to use conditional formatting, other than that, what I need to accomplish in this form is exactly what the sample database does. Currently my txtBackground textbox comes up with a yellow background for all records, not just the selected one. Any help is appreciated.

    Problem 1: I attached a screen print of the conditional formatting I set up. I think part of my problem is that the expression syntax may not be correct, but I'm not getting an error. The text box names are correct. TagNmbr is the textbox in the detail section, txtHiddenTagNmbr is the hidden textbox in the footer section. The textbox in the footer section is correctly populated when selecting records (Form_current) from the detail section.

    Problem 2: In the sample database the Form_Current procedure calls the Recalc method. Does calling Recalc trigger the Form_open procedure? When I debug, the form tries to reset my recordsource, which I set in the Form_Open procedure. I tried to just requery the textbox to trigger the conditional formatting, but still nothing.

    I pasted the code below:
    Private Sub Form_Current()

    txtHiddentTagNmbr = Me.TagNmbr
    'Me.txtBackground.Requery
    'Me.Recalc

    End Sub

    Private Sub Form_Open(Cancel As Integer)

    Me.RecordSource = fncGetNoMatchToProvidedSQL(fncGetManifestID([Forms]![frmMain]![txtMnfstNmbr]))
    Me.Caption = "Logical Match " & [Forms]![frmMain]![txtMnfstNmbr]

    End Sub
    Attached Images Attached Images
    • File Type: jpg x.jpg (43.5 KB, 1 views)

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Highlight current row (2002)

    I'd study the sample database carefully.

    You can also search Google for highlight current record or similar.

Posting Permissions

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