Thread View: alt.lang.basic
2 messages
2 total messages
Started by Editions Doc
Fri, 25 Aug 2000 00:00
=> VB SQL QUERY PROBLEM
Author: Editions Doc
Date: Fri, 25 Aug 2000 00:00
Date: Fri, 25 Aug 2000 00:00
21 lines
1657 bytes
1657 bytes
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.
Re: => VB SQL QUERY PROBLEM
Author: Eric L
Date: Fri, 25 Aug 2000 00:00
Date: Fri, 25 Aug 2000 00:00
45 lines
2094 bytes
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.
>
>
>
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads