Continuous Form

  • Thread starter Thread starter SDCT
  • Start date Start date
S

SDCT

I am trying to get a command button's caption to display some text
along with the value of a textbox control for each record in a
continuous form... I took this approach but it displays only the value
of the first record's control on the button for every subsequent
record...

cmdButton.Caption = "Update " & txtBox.Value

Any tips are greatly appreciated...
 
the command button (or any unbound control) really only "exists" once even
though you see many of them.

you could use a bound control that looks like button (raised gray text
field) you could evn have code that makes a sunken field on click (a
conditional format maybe)

hth
 
SDCT said:
I am trying to get a command button's caption to display some text
along with the value of a textbox control for each record in a
continuous form... I took this approach but it displays only the value
of the first record's control on the button for every subsequent
record...

cmdButton.Caption = "Update " & txtBox.Value


You can not use VBA code to set control properties for
individula rows in a continuous or datasheet form. There is
only one control so there is only one set of properties and
natuarally they will be the same on all rows.

What you can do is use a text box with Locked aet to Yes and
Special Effect set to Raised to simulate a button. Then you
can set the text box's control source to an expression based
on a field in the form's record source table/query. Maybe
something like:

=GetCaption(somefield)

where the function would be the code that determines the
"caption"
 
Back
Top