Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default help in showing results of database query

hi i connect to a oracle database and i i do the
following select
select distinct(book)
from book_table
where trun(date)=trunc(sysdate-1)

it returns a column of with 3 rows in it
what i have is a form that has 3 text boxes on it
i want to put the first row value on textbox 1
and the second row value in txt box 2
and so on
can anyone advise how

cheers

andy
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 593
Default help in showing results of database query

"andy" wrote ...

hi i connect to a oracle database and i i do the
following select
select distinct(book)
from book_table
where trun(date)=trunc(sysdate-1)

it returns a column of with 3 rows in it
what i have is a form that has 3 text boxes on it
i want to put the first row value on textbox 1
and the second row value in txt box 2
and so on


If you have opened an ADO recordset named 'rs', then something like:

Form1.TextBox1.Text = rs!Book
rs.MoveNext
Form1.TextBox2.Text = rs!Book
rs.MoveNext
Form1.TextBox3.Text = rs!Book

Jamie.

--
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Import New Database Query (Union Query) in Spreadsheet klock Excel Discussion (Misc queries) 2 September 24th 09 01:30 AM
database query not showing foxpro database How I import data mangat New Users to Excel 1 June 24th 07 03:31 PM
Anyone Else Use Database Query to Query Another Sheet in the Same Excel Workbook? jocke Excel Discussion (Misc queries) 1 November 29th 05 01:44 PM
Anyone Else Use Database Query to Query Another Sheet in the Same Excel Workbook? jocke Excel Discussion (Misc queries) 0 November 28th 05 06:37 PM
How to use a Access Query that as a parameter into Excel database query Karen Middleton Excel Discussion (Misc queries) 1 December 13th 04 07:54 PM


All times are GMT +1. The time now is 03:47 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"