Group:  Microsoft Access ยป microsoft.public.access.modulesdaovba.ado
Thread: Formatting table in VBA

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Formatting table in VBA
"Michael Clavien" <mclavien[ at ]comcen.com.au> 01.02.2006 22:05:22
Hi,

I am populating a table with VBA. I need to format a field like this

If the value is less than 100000 than add 30000000 to the value
if the value is more than 100000 then add 400000000 to the value

What would be the easiest way to do this?


Thanks

Michael Clavien
Unit 1, 1 Gordon St CAMPERDOWN NSW 2050 Australia
Ph: +61 2 9519 6650
Power Electronics & Industrial Control Solutions


Re: Formatting table in VBA
"Douglas J. Steele" <NOSPAM_djsteele[ at ]NOSPAM_canada.com> 01.02.2006 22:49:07
What do you want to do if the value is 100000?

If MyValue <= 100000 Then
MyValue = MyValue + 30000000
Else
MyValue = MyValue + 400000000
End If

or

MyValue = MyValue + IIf(MyValue <= 100000, 30000000, 400000000)

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Michael Clavien" <mclavien[ at ]comcen.com.au> wrote in message
news:43e130ab$0$17811$61c65585[ at ]un-2park-reader-01.sydney.pipenetworks.com.au...
[Quoted Text]
> Hi,
>
> I am populating a table with VBA. I need to format a field like this
>
> If the value is less than 100000 than add 30000000 to the value
> if the value is more than 100000 then add 400000000 to the value
>
> What would be the easiest way to do this?
>
>
> Thanks
>
> Michael Clavien
> Unit 1, 1 Gordon St CAMPERDOWN NSW 2050 Australia
> Ph: +61 2 9519 6650
> Power Electronics & Industrial Control Solutions
>


Re: Formatting table in VBA
"Michael Clavien" <mclavien[ at ]comcen.com.au> 02.02.2006 06:16:04
Thanks Douglas,
It is a much simpler solution than expected

Regards Michael Clavien Unit 1, 1 Gordon St CAMPERDOWN NSW 2050 Australia
Ph: +61 2 9519 6650 Fax +61 2 9519 7460 Power Electronics & Industrial
Control Solutions
"Douglas J. Steele" <NOSPAM_djsteele[ at ]NOSPAM_canada.com> wrote in message
news:%23egE2G4JGHA.1028[ at ]TK2MSFTNGP11.phx.gbl...
[Quoted Text]
> What do you want to do if the value is 100000?
>
> If MyValue <= 100000 Then
> MyValue = MyValue + 30000000
> Else
> MyValue = MyValue + 400000000
> End If
>
> or
>
> MyValue = MyValue + IIf(MyValue <= 100000, 30000000, 400000000)
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no private e-mails, please)
>
>
> "Michael Clavien" <mclavien[ at ]comcen.com.au> wrote in message
> news:43e130ab$0$17811$61c65585[ at ]un-2park-reader-01.sydney.pipenetworks.com.au...
>> Hi,
>>
>> I am populating a table with VBA. I need to format a field like this
>>
>> If the value is less than 100000 than add 30000000 to the value
>> if the value is more than 100000 then add 400000000 to the value


Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net