473,394 Members | 1,774 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,394 software developers and data experts.

How to display selected value in datagrid vb 6.

I'm trying to get the value of medicine that has a quantity of less than 15 and display it in datagrid.
For example I have paracetamol that has quantity of 15 or less then the paracetamol will automatically display in the datagrid. I have a table name inventory with the field names MedicineName, Genericname, StockQuantity etc. My problem here is all the records in database display.
Please help me. Thank you..


Here is my code in adodc connection
Select StockQuantity from inventory

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Load()
  2.   Adodc2.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\clinic.mdb" & ";Persist Security Info=False"
  3. Adodc2.RecordSource = "select * from inventory order by StockQuantity asc"
  4. Set DataGrid2.DataSource = Adodc2
  5. Adodc2.Refresh
  6.  
  7. IF  StockQuantity <= 15 then Adodc2.Recordset(“StockQuantity”)
  8. End if
  9. End sub
  10.  
Feb 19 '14 #1
0 944

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

Similar topics

24
by: London | last post by:
Hello Can you help me. By ASP How can I get the dropdown(control'name)'s selected value? What is it's property'name?
6
by: Jenna Alten | last post by:
I have a datagrid with a template column that contains a dropdown list. I currently fill and display the dropdown list on the page load. This is working correctly. I am NOT using an Edit Column. I...
3
by: Jon | last post by:
Hello all, Through JavaScript, I add a row to a DataGrid. This new row has a number of columns, one of which contains a SELECT control with a couple of items - again, all done through...
2
by: Lars Erik Nes | last post by:
Hi I can't get this to work. I have a CustomerForm which display data from several tables in datagridviews. In another form (opened from CustomerForm), called NewCallForm, i have a listview...
0
by: keithsimpson3973 | last post by:
Does anyone know if it is possible to display the value of a date picker control on a vb6 form that the user selected on an access report? I am using vb6 to display a report selection and it has a...
0
by: Kysonel | last post by:
Hello ! I have been trying to use the datagridComboColumnStyle that was decribed in this thread : ...
3
by: =?Utf-8?B?TWFyayBCb2V0dGNoZXI=?= | last post by:
I am writing a Windows Form app in c# and I've populated a combobox with values. I click on the down arrow to display the list and the list of values displays correctly. Once I select a value,...
1
by: vibhashin | last post by:
I hve extracted a coloumn in combo box from database. I want that when i select a particular value from the combo box it should display the related details of the selected value in the combo box in...
1
by: Rachel1234 | last post by:
what is the php code for display selected dob value from drop down list - day and month <form action="http://bytes.com/registerProfile.php" method="post"> <fieldset> <legend>Enter your...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
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...

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.