|
|
 |
| VB How-To Ask your "How do I do this with VB?" questions in this forum. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the VB How-To section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |

July 19th, 2005, 11:34 AM
|
|
Authorized User
|
|
Join Date: Jul 2005
Location: , , .
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Clearing a label in FORM LOAD
Hello,
I need to write some VBA code to clear a label in FORM LOAD.
|

July 19th, 2005, 01:44 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
Posts: 1,114
Thanks: 2
Thanked 4 Times in 4 Posts
|
|
To clear a label in the form load, you can simply write
Me.lblMyLabel.Caption = ""
but this may cause problems. I don't know if labels can be set to zero length; so you can hide it entirely but not clear it, e.g.
Me.lblMyLabel.Visible = False
Replace "lblMyLabel" with the actual name of your label.
Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
|

July 19th, 2005, 02:22 PM
|
|
Authorized User
|
|
Join Date: Jul 2005
Location: , , .
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Greg thank you for your help this is what I end up doing.
Private Sub Form_Open(Cancel As Integer)
'disable editing if contract is closed
If Me.Closed.Value = True Then
Me.AllowEdits = False
Me.lblContractClosed.Visible = True
Else
Me.AllowEdits = True
Me.lblContractClosed.Visible = False
End If
'If EURO is chcked display EURO on invoice form
If Forms![Invoice Scanner].EURO = True Then
Forms![Invoice Scanner]!InvSub.Form!CurPayIn = "EURO"
'If GBP is checked othen display GBP on nnvoice
ElseIf Forms![Invoice Scanner].GBP = True Then
Forms![Invoice Scanner]!InvSub.Form!CurPayIn = "GBP"
'If GBP and EURO = false then display U.S. dollars
Else
Forms![Invoice Scanner]!InvSub.Form!CurPayIn = "U.S. Dollars"
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |