473,385 Members | 1,474 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Continuous form button captions....

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
3 6740
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Paolo | last post by:
I have a save button in a continuous form called Purchase Order. The button contains several conditional statements which make sure that all mandatory fields are properly filled out by the user....
5
by: Armando | last post by:
I recently saw the tail end of a "Continuous forms" discussion, but not enough was available to see if this will be a PITA repeat question. Sorry if it is. On a form with its Default View...
3
by: Richard Hollenbeck | last post by:
I have the following query in my form's code: Private Function Get_Data(fieldNum As Integer) Dim strSQL As String Dim db As DAO.Database Dim rs As DAO.Recordset strSQL = "SELECT & "", "" & ...
4
by: Kathy | last post by:
What is the standard technique for handling the fields in the following scenario on a continuous form? Multiple Divisions. Each Division has multiple Buildings. Each Building has a Supervisor. ...
1
by: gavo | last post by:
Hello everyone! Using A2K i have a form(a) with a subform(b) and within the subform there is a continuous subform(c). in the subform (b) there is a command button used to call a public...
11
by: Doug Bell | last post by:
Hi, I am trying to create form that displays data like an Access continuous dataform rather than using a data grid. I am thinking that I can achieve this by creating a row of text boxes, one...
20
by: Robert | last post by:
Need some help to stop me going around in circles on this one.... Have a nested subform (subform2) which simulates a continuous form for the record on the parent subform. Subform2 has rows of...
7
by: Dave | last post by:
Hello All, These one may be a bit tricky, and what I'd like to do may not even be possible. I would love to hear any ideas you guys have for solving this. Here is the situation: I have a form...
3
by: AdamOnAccess | last post by:
This is something I've always had trouble with, and it comes up fairly frequently... I have a continous form with a single text field and next to this text field, I have a caption that maintains...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.