473,387 Members | 1,536 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,387 software developers and data experts.

Placing a black line through deceased items

Could somebody please tell me if it is possible, and if so how, to
place a command button on a form so that when it is clicked a black
line will be placed through all the clients information (name,
address, DoB, etc) on that form. Thus notifying others that that
person is deceased.

Many thanks for any help you can provide

Stu
Nov 12 '05 #1
2 1436
On 6 Apr 2004 05:07:21 -0700, Stuart Masters wrote:
Could somebody please tell me if it is possible, and if so how, to
place a command button on a form so that when it is clicked a black
line will be placed through all the clients information (name,
address, DoB, etc) on that form. Thus notifying others that that
person is deceased.

Many thanks for any help you can provide

Stu


Access does not support strike-through text.

A better solution would be to simply change the control's backcolor or
forecolor. That's easily done.

All you need is a [Deceased] (Yes/No datatype) field added to the
table, and if you are using Access 2000 or later, code each control's
Conditional Formatting property to change the color.

Set the Condition1 drop-down of each control to
Expression Is
In the dialog box along side the drop-down write:
[Deceased] = -1

Set the colors accordingly.
Repeat for each control on the form that you wish to change.

Check the box (no Command Button needed) to indicate deceased, and the
colors will change.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 12 '05 #2
DFS
"Stuart Masters" <st************@pcs-tr.swest.nhs.uk> wrote in message
news:60**************************@posting.google.c om...
Could somebody please tell me if it is possible, and if so how, to
place a command button on a form so that when it is clicked a black
line will be placed through all the clients information (name,
address, DoB, etc) on that form. Thus notifying others that that
person is deceased.

Many thanks for any help you can provide

Stu

As far as I can tell, you won't be able to use strike-thru font or text on
the form, but you can kludge it up this way:

* add a Yes/No field to the database table, indicating deceased or not
* for each text box you want to strike thru on the form, create a narrow
line object
* label the lines line1, line2, line3, etc.
* for all these lines, set the Visible property to No
* in the Form Open or Current event add this code

Dim ctl As Control, i As Byte, j As Byte
i = 1

For i = 1 to (whatever number of lines)
Me("line" & i).Visible = False
Next i

If Dlookup("Deceased_YN","Table","DeceasedName = '" &
Forms.FormName.DeceasedName & "'") = True then
For Each ctl In Me.Controls
If ctl.ControlType = acTextBox Then
Me("line" & i).Width = ctl.Width - 200
Me("line" & i).Left = ctl.Left + 100
Me("line" & i).Top = ctl.Top + (0.5 * ctl.Height)
Me("line" & i).Visible = True
i = i + 1
End If
Next ctl
Endif
The -200 and the + 100 positioning will start and end the line a little bit
inside the text box. It looks better (I think), as does a red line color.

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Phil Powell | last post by:
You have ordered one item and placed it into your cart. Let's say you ordered one small black t-shirt. Your cart will have the product_id, color_id and size_id for the small black t-shirt. The...
2
by: Stuart Masters | last post by:
Could somebody please tell me if it is possible, and if so how, to place a command button on a form so that when it is clicked a black line will be placed through all the clients information (name,...
7
by: Michael Galvin | last post by:
I am trying to use Python to send to the printer a calender filled with a mix of text and simple graphics. I want to draw on the printed page something like a table with 6 rows and 7 columns to...
9
by: Adi | last post by:
Hello eveyone, I wanna ask a very simple question here (as it was quite disturbing me for a long time.) My problem is to read a file line by line. I've tried following implementations but still...
0
by: jobs | last post by:
On the asp.net 2.0 menu control under vs 2005. Any way to remove that black arrow on menu items that have a submenu? Any way to equally size menu items dispite text site of menu item? Thanks...
6
by: Jerry West | last post by:
I'm a newbie to .NET from VB6. I have a Form with a Panel control on it. When the Form loads it maximizes and so does the Panel control. I then fill an array with the path to images at a...
2
by: vertozia | last post by:
Hey there, ive been having difficulty placing an image, this is my screenshot, and what ive done so far: http://img341.imageshack.us/img341/9894/gridwg2.jpg /** * ConnectFourGUI * Provide...
6
by: Liam Gibbs | last post by:
Hello everyone, I'm trying to program a church web site and I'm having a number of problems with the layout. The html is at http://www.altmarvel.net/Liam/index.html and the css is at...
1
by: AliR \(VC++ MVP\) | last post by:
Hi Everyone, I have a few form classes that inherit from the same base class. The main reason that this is done is that some event handlers are common between these classes and I was trying to...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.