473,895 Members | 2,245 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

display all records from a table

subashini Thiyagarajan
218 New Member
Hi all,

i have just displayed all the records from one table of access database.it is very easy right. Now....... i have given sort by option on the top using list box.when we select any item from the list box it will compare with the column data and where the same content is there in any record,only those records it display.everyth ing working fine..

now my problem is without selecting any content it is defaultly selecting the last search and displaying those records........ ............... pls help, at the intial stage (i mean without any selection) all records should get displayed.

How to do????????????? ?????
Mar 19 '07 #1
4 1437
3,406 Recognized Expert Specialist
now my problem is without selecting any content it is defaultly selecting the last search and displaying those records........ ............... pls help, at the intial stage (i mean without any selection) all records should get displayed.
First check that your query statement is correct. It sounds like the query is keeping the wrong info.

Mar 20 '07 #2
subashini Thiyagarajan
218 New Member
My query is this

"select * from tablename where columnname=" & selection

Intially selection is nothing so it supposed to show all records.but for me intial stage as soon as the page displays it automatically takes the first selection and showing the details.
in select option i have not specified any selected near any option

could u help me?
Mar 20 '07 #3
3,406 Recognized Expert Specialist
That looks good, I always use the "SELECT * " as well no matter what I pull up.

I have done something very similar to the project you described. I was listing books by different authors, but instead of the user selecting a sort field from a drop down list I put a link in each table header, so under the field "title" or "author" or whatever, I put a link to [HTML]<a href="dataliste r.asp?sort=auth or">Author</a>[/HTML] When I create the query statement I say:
Expand|Select|Wrap|Line Numbers
  1. query = "SELECT * FROM works"
  2. if request("sort") = "" then
  3.    query = query & " ORDER BY title"
  4. else
  5.    query = query & " ORDER BY " & request("sort")
  6. end if
  8. 'the next line will be commented out in the final version:
  9. response.write query & "<br>" & vbNewLine
There is a lot that can go wrong with any query statement, so I print the query as a matter of fact now until everything is up. I would first try to eliminate the possibility that the query string is being written wrong. Try to get the table to display incorrectly AND show the actual query string and you might be able to catch the problem, or at least eliminate that possibility.

Does that make sense?

Mar 20 '07 #4
3,406 Recognized Expert Specialist
Ok, now that I re-read your post, I see that you are using your selection drop down box to add a "where" clause, and I was using it to add an "order by" clause, but my answer is still the same: try to get the error AND print the query string.

Mar 20 '07 #5

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

Similar topics

by: Carl | last post by:
I have a main form with navigation buttons on it and a label showing for example Record 1 of 15 using recordsetclone on it and eveything works fine. When I move through the records the record number changes fine. Within this main form I have a subform detailing distribution records for the contact (main form is based on this) that also has navigation buttons and a label showing Distribution 1 of ##. This is where the problem lies. The...
by: SJM | last post by:
I have a problem that occurs occasionally with a db for a undetermined reason which I would love to solve. I construct and append a series of 7 records to a table using ADO recordset. Each record represents a day of the week, and the code appends a record starting with Monday and finishing with Sunday. After appending the 7 records to a table I then refresh the screen and display the records in a subform for the user to edit. What happens...
by: matthewemiclea | last post by:
I am trying to display information in Access on a form that takes information from many different queries and puts them together on a spreadsheet or chart. Some specific info: The information I am displaying consists of a work order schedule(for the current date), work orders completed , work orders not completed, a past due schedule, past due completed, and past due not completed. These are grouped by workcenters. Therefore, one...
by: M. David Johnson | last post by:
I cannot get my OleDbDataAdapter to update my database table from my local dataset table. The Knowledge Base doesn't seem to help - see item 10 below. I have a Microsoft Access 2000 database which indexes computer magazine articles for personal reference. I am developing a Visual Basic.NET program whose sole purpose is to enter new records into the database. No updates to existing entries, no deletions, and no display
by: dennis.joseph | last post by:
Hello Everyone, I have scoured through a million messages (ok...thats a bit exaggerated) but I just cannot figure out how to display null values in a query. I have tried Nz, IIF, Count(*) but it just does not work. I hope someone can help me with this. Here are the details: Table: Group Fields: Group Name, Group ID Table: Region
by: rn5a | last post by:
A MS-Access DB has 3 tables - Teacher, Class & TeacherClass. The Teacher table has 2 columns - TeacherID & TeacherName (TeacherID being the primary key). The Class table too has 2 columns - ClassID & ClassName (ClassID being the primary key) The TeacherClass table has 3 columns - TCID (AutoNumber), TeacherID & ClassID. One teacher can teach multiple classes & one class can be taught by multiple teachers. The TeacherClass table basically...
by: Ian | last post by:
I have a form with a sub form, on the continues sub for I want to display some data along with a picture, on the On Current event I have the code: .Picture = Nz() is the name of the picture control, is the name of the text field that holds the path to the jpg. What I want is each record in the sub form to show the associated
by: imtmub | last post by:
I have 3 table for Purchase Order from ERP Database Tables: POD=Purchase order Details(this table has Require Qty field) POR=Purchase Order Receive (This table has RequireQty and ReceiptQty Fields) POI=Purchase order Inspect I want a query to display Purchase order History. My Query is here SELECT dbo.POD.POD_PurchOrderID, dbo.POD.POD_POLineNbr, dbo.POI.POI_StatusCode, dbo.ProjectGroup.PRJG_ProjectID, dbo.POI.POI_Reference,...
by: petter | last post by:
Hi! I have two questions: one question that regards the COUNT-function, and one about how to display a month even if I don’t have any data for that month. I have an Access database where I want to create a query to count all the internal units in my list (the “input”-table), between two dates. I want my list to be grouped by year and month. Here is the SQL-code, as called from VBA: strSQL_INTU1 = "PARAMETERS DateTime, DateTime;" _ ...
by: kurtzky | last post by:
i created a form that should function as follows: i will enter a number in a textbox..then it should query from the database all the records which has that number..these records will have a different item no in it..then, these records will be saved in a temporary datatable (which i made in a separate class, the name is WBASKET)...The item nos of these records will be displayed in a combobox, say item1, item2, etc.. then,i have a datagrid...
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.