🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.lang.basic
Article #707

Re: => VB SQL QUERY PROBLEM

#707
From: Eric L
Date: Fri, 25 Aug 2000 00:00
45 lines
2094 bytes
This should help:

Private Sub Form_Load()
    Dim i As Integer
    Dim d As Double

    d = 10#

    For i = 1 To 5
        MSFlexGrid1.Row = i
        MSFlexGrid1.Col = 1
        MSFlexGrid1.Text = Format(d, "###,###.00")
        d = d + 10#
    Next
End Sub

Eric
"Editions Doc" <editions.doc@wanadoo.fr> wrote in message
news:8o65l3$3js$1@wanadoo.fr...
> Hello,
>
> I'm currently looking for a way to have my SQL query (inside VB6) display
> decimals after the request in a msflexgrid (linked to a DATA control).
> For example, I have two prices : 12,30 and 42,00 (stored in a database).
My
> SQL query searches for prices higher than 10. So, my two prices are OK,
and
> are diplayed inside the MsFlexGrid, but My two decimals from the 42,00
> price, aren't shown (42 is displayed, and not 42,00).
>
> Here is the SQL query I use (on a command button click) :
>
> MsFlexGrid1.Datasource = Data1
> ' Table name : prices
> ' Field in table prices : price
> Data1.RecordSource = "SELECT price FROM prices"
> Data1.Refresh
>
> Thank you for your help !
>
> Bye ;-)
> Alex.
>
>
>
Technical Details
Message-ID: <wHCp5.729$sA.37121@nnrp5-w.sbc.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <8o65l3$3js$1@wanadoo.fr>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f7646,b2e738639b6deede
X-Google-Attributes: gidf7646,public
X-Google-Thread: 10ab99,b2e738639b6deede
X-Google-Attributes: gid10ab99,public
X-Google-Thread: 110e3b,b2e738639b6deede
X-Google-Attributes: gid110e3b,public
X-Google-Thread: f645d,b2e738639b6deede
X-Google-Attributes: gidf645d,public
From: "Eric L" <ongnam@pacbell.net>
Subject: Re: => VB SQL QUERY PROBLEM
Date: 2000/08/25
Message-ID: <wHCp5.729$sA.37121@nnrp5-w.sbc.net>
X-Deja-AN: 662545031
References: <8o65l3$3js$1@wanadoo.fr>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
X-Complaints-To: abuse@pacbell.net
X-Trace: nnrp5-w.sbc.net 967243612 63.197.233.169 (Fri, 25 Aug 2000 15:46:52 PDT)
Organization: SBC Internet Services
X-MSMail-Priority: Normal
NNTP-Posting-Date: Fri, 25 Aug 2000 15:46:52 PDT
Newsgroups: alt.lang.basic,comp.lang.basic.visual,comp.lang.basic.visual.misc,fr.comp.lang.basic