select record on continuous form

  • Thread starter Thread starter george
  • Start date Start date
G

george

Hi,

I would like to be able to select the entire record of a
continous form when I click on any of the its fields (so
that the whole record is highlighted just like a list
box). Is this possible?

thanks in advance, george
 
thanks for the reply,
I looked at the Help file, but still I can't think of the
expression I need to use to select the entire field. Would
it be possible to give me an example?
george
 
george said:
I would like to be able to select the entire record of a
continous form when I click on any of the its fields (so
that the whole record is highlighted just like a list
box). Is this possible?


FIrst, create a text box that is a large as the entire
detail section and use Send to Back to get it behind all the
other controls. (You may also want to make the other
control's BackStyle transparent?)

Next add an unbound text box named txtCurrent to the form's
header section. Add a line of code to the form's Current
event procedure:

Me.txtCurrent = Me.<pk field name>

Now you can use Conditional Formatting to specify the
background color of the big text box using Expression Is:

<pk field name> = txtCurrent
 
hi,

in the event that the individual record is identified by a composite PK,
then i suppose that there would need to be as many of the txtCurrent fields
(in my case 5 differentiated by perhaps an integer at the right) as there are
members of the PK, followed by something like

Me.txtCurrent1 = me.nameofpKfield1
Me.txtCurrent2 = me.nameofpkfield2
....
Me.txtCurrent5 = me.nameofpkfield5

assuming i'm right, how would you conditon the background color of the big
textbox?

i would like to change just the details section if that matters; the default
bgrnd color's number's 14613758 and for the sake of this discussion let's say
the highlighted color's would be 4227327.

lastly my form's actually a 'child' type sub-form (which hopefully won't
change a thing).

best,

-ted
 
Back
Top