473,408 Members | 2,888 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

list box search and results display on list box

I would like to make a query from
transactions to see the patron history by enter a barcode.
I have made a recordset to get the patron barcode
in the same time to get the Id field from patrons
as this value is connected to the [checked out to] field in the transaction.


I have tried
Expand|Select|Wrap|Line Numbers
  1.          str = "SELECT [ID], [BookID], [Checked in date], [Checked Out Date], [DueDate] FROM Transactions ORDER BY [duedate] Where [checked out to] = " & _
  2.             rspatrons![ID]
  3.  
  4.  
  5.             Me.result_list.AddItem "ID; Title; Checked in date; checked out date ; due date "
  6.             Me.result_list.RowSource = str
my result_list is a value list type
and it displays
ID book id checked in date checked outdate due date

in the first line without my search results.

did i miss anything ?
thanks.
Jan 7 '12 #1

✓ answered by issactang

i tried to do this

Expand|Select|Wrap|Line Numbers
  1.  str = "select  [books].[id],[books].[title],[transactions].[checked in date],[transactions].[checked out date],[transactions].[due date]" & _
  2. "from transactions " & _
  3. "where [transactions].[checked out to] = " & _
  4. rspatrons![ID] & _
  5. "inner join books " & _
  6. " ON [transaction].[bookid] = [books].[id] " & _
  7. "order by [transactions].[due date]"
  8.  
  9.             Me.result_list.RowSource = str
but still no record is displayed

3 1926
i tried to do this

Expand|Select|Wrap|Line Numbers
  1.  str = "select  [books].[id],[books].[title],[transactions].[checked in date],[transactions].[checked out date],[transactions].[due date]" & _
  2. "from transactions " & _
  3. "where [transactions].[checked out to] = " & _
  4. rspatrons![ID] & _
  5. "inner join books " & _
  6. " ON [transaction].[bookid] = [books].[id] " & _
  7. "order by [transactions].[due date]"
  8.  
  9.             Me.result_list.RowSource = str
but still no record is displayed
Jan 7 '12 #2
Rabbit
12,516 Expert Mod 8TB
That's because if you want to use a query as a row source, you can't use value list as the type.
Jan 7 '12 #3
i used table/ query
and used a wizard to help me configure the query instead with cross table.

and add the following code.

Expand|Select|Wrap|Line Numbers
  1.   str = "SELECT ID,[title],[checked in date],[checked out date],[duedate] " & _
  2.              "FROM patronlendinghistory " & _
  3.         "Where [checked out to] = " & _
  4.              rspatrons!ID
  5.  
  6.  
  7.             Me.result_list.RowSource = str
Jan 7 '12 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Alexandre Plennevaux | last post by:
hello mates, i want to set up a searchable database out of a huge word document containing reglementary articles (75 pages). The way i want the system to work is as such: a search form...
4
by: dave | last post by:
I am wondering if the following can be done. I want to setup a search page that utilizes full text searching in sql2000. I want the user to type in say "where is bill" and have the query search...
2
by: CharitiesOnline | last post by:
Hello, I have set this script up to add paging to a search results page. Which on the first page works fine. I calculates how many pages there should be depending on the number of results returned...
5
by: George | last post by:
Hi, Anyone has the background for explaining? I have made a search on my name and I have got a link to another search engine. The link's title was the search phrase for the other search engine...
2
by: Maurice | last post by:
Hi does anyone know if it's possible in .NET to display a multicolumn list like in MSAccess? I'm building an application in which a user can enter a search text and the application will then show...
4
by: Dica | last post by:
i apologize for what is no doubt a very rudimentary question, but i'm still trying to wrap my brain around .net coding habits. in classic asp, if i wanted to show search results, i'd just post the...
0
by: =?Utf-8?B?Qm9ubmll?= | last post by:
I have a basic ASP / Index Server search page. I have a web site contained in a subdirectory in the root of a main web site. What I’m trying to do is force the search page in the subdirectory,...
2
by: gomzi | last post by:
Hi, I would like to know as to how I could make the google (or any search engine for that matter) display the aspx pages in the search results. i.e. I display the articles on the aspx page...
5
by: moorcroft | last post by:
Hi I have developed an application that people can use to search for planning applications. The way it works is that once search criteria has been selected and submit is hit, the server will save...
1
by: ghjk | last post by:
In my php page there is a search function and when user search it will display table containing search results. I want to add <a href ..></a> . Because when user click one record I want to pass...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.