PC Review


Reply
Thread Tools Rate Thread

adding more fields to code

 
 
=?Utf-8?B?T2N0ZXQzMg==?=
Guest
Posts: n/a
 
      23rd Jul 2007
Private Sub Form_Current()
‘If diverted color red.
I would like to add to fields [field2] and [field3] to this code and have it
do the same as field1
How do i do this?

If [field1] >= 0 Then
[lblBoxMsg].Visible = True
[field1].ForeColor = 255

Else

[lblBoxMsg].Visible = False
[field1].ForeColor = 0

Octet
 
Reply With Quote
 
 
 
 
=?Utf-8?B?SmFja2llIEw=?=
Guest
Posts: n/a
 
      23rd Jul 2007
Put an End If at the end of the code you provided and then begin another If
statement ending with an End If for Field2. Continue for each of the fields.

Hope this helps

"Octet32" wrote:

> Private Sub Form_Current()
> ‘If diverted color red.
> I would like to add to fields [field2] and [field3] to this code and have it
> do the same as field1
> How do i do this?
>
> If [field1] >= 0 Then
> [lblBoxMsg].Visible = True
> [field1].ForeColor = 255
>
> Else
>
> [lblBoxMsg].Visible = False
> [field1].ForeColor = 0
>
> Octet

 
Reply With Quote
 
=?Utf-8?B?T2N0ZXQzMg==?=
Guest
Posts: n/a
 
      23rd Jul 2007
Works Great
Thanks Jackie

"Jackie L" wrote:

> Put an End If at the end of the code you provided and then begin another If
> statement ending with an End If for Field2. Continue for each of the fields.
>
> Hope this helps
>
> "Octet32" wrote:
>
> > Private Sub Form_Current()
> > ‘If diverted color red.
> > I would like to add to fields [field2] and [field3] to this code and have it
> > do the same as field1
> > How do i do this?
> >
> > If [field1] >= 0 Then
> > [lblBoxMsg].Visible = True
> > [field1].ForeColor = 255
> >
> > Else
> >
> > [lblBoxMsg].Visible = False
> > [field1].ForeColor = 0
> >
> > Octet

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding new table fields from code =?Utf-8?B?Q2hhcmxlcyBUYW0=?= Microsoft Access Form Coding 3 31st Oct 2009 12:29 PM
Adding Fields in an Access 2003 Form, including null fields =?Utf-8?B?Qi4gTGV2aWVu?= Microsoft Access 5 12th Nov 2006 04:56 AM
Clear Search Fields code adding to an existing Command Button Igor via AccessMonster.com Microsoft Access Queries 1 2nd Jun 2006 01:48 PM
Repost: Adding New Fields to Tables using Code Richard Krupa Microsoft Access Form Coding 9 10th Oct 2003 07:54 AM
Adding New Fields to Tables using Code Richard Krupa Microsoft Access Form Coding 0 8th Oct 2003 10:43 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:48 AM.