By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,444 Members | 3,182 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,444 IT Pros & Developers. It's quick & easy.

Continuous form button captions....

P: n/a
Hi,

I need a button shown for each record (cont. form) with specific
captions on each.

I have a notes form for each record. When a user presses the button
they can read the notes. I want to display a caption on the button to
state either "Order Notes" or "READ NOTES".

I placed a label over the button, and depending if the notes field is
empty or not for each record the label should display the relevant
caption.

Which event should I place my code in for the to work on the form.
Form Load sets all captions for all records the same ?. Is the only
way to do this, to place an additional field in my table and change
that as per record ?
David
Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
David wrote:
Hi,

I need a button shown for each record (cont. form) with specific
captions on each.

I have a notes form for each record. When a user presses the button
they can read the notes. I want to display a caption on the button to
state either "Order Notes" or "READ NOTES".

I placed a label over the button, and depending if the notes field is
empty or not for each record the label should display the relevant
caption.

Which event should I place my code in for the to work on the form.
Form Load sets all captions for all records the same ?. Is the only
way to do this, to place an additional field in my table and change
that as per record ?


You can have a calculated field, and (mis)use the Click event for its
control.

You *cannot* have buttons with different captions for each record. Claim
for A97.

--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html
I prefer human mail above automated so in my address
replace the queue with a tea
Nov 13 '05 #2

P: n/a
If I understand you correctly, you want to change the caption of a
button depending on if there are notes or not in a certian field for
each record.

This is actually easy enough to do.

In your form you can use the After_Update () event for the form to
change the buttons.

You could have your buttons change something like this.

Me!YourBtn.Caption = "Read Notes"

When your user clicks the button you can retrieve the caption and use
that to determine which you need to do.
stNotes = Me!YourBtn.Caption.Value

No extra fields needed.

Nov 13 '05 #3

P: n/a
You can use Conditional Formatting to basically achieve the desired
effect. Make the area large enough to accomodate two TextBox controls
one for each Caption. Using CF, set the Backcolor of the TextBox to be
equal to the ForeColor(text) of the TextBox when you want it to be
invisible.
Set the TextBox props to mimic the look of a COmmandBUtton.
See the sample here:
http://www.lebans.com/conditionalformatting.htm
New Feb 08,2002. Added support for Datasheet view and SubForms.

A2KConditionalFormatting.zip is a sample MDB demonstrating how to
programmatically setup Conditional Formatting to simulate:

1) Highlighting of the Current Row for a Form in Continuous or Datasheet
View

2) Highlighting of Alternate Rows for a Form in Continuous or Datasheet
View

Version 2.7

Added sample demonstrating how to achieve a background
Hover/Highlighting of rows for a form in Continuous view.

Version 2.3

Added sample demonstrating how to achieve pseudo enable/disable of an
unbound control on a form in Continuous View.

Version 1.9

Added sample form to show how to apply conditional formatting to based
on a Boolean(Yes/No) field.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"David" <da***@scene-double.co.uk> wrote in message
news:c1**************************@posting.google.c om...
Hi,

I need a button shown for each record (cont. form) with specific
captions on each.

I have a notes form for each record. When a user presses the button
they can read the notes. I want to display a caption on the button to
state either "Order Notes" or "READ NOTES".

I placed a label over the button, and depending if the notes field is
empty or not for each record the label should display the relevant
caption.

Which event should I place my code in for the to work on the form.
Form Load sets all captions for all records the same ?. Is the only
way to do this, to place an additional field in my table and change
that as per record ?
David


Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.