Hi All
I am working on a project in which i have to face a problem. In my project I have Three listboxes and I want to store these listboxes Items in MS Access database. I don't know how to do this.
can any one help me
5 3760
Hi All
I am working on a project in which i have to face a problem. In my project I have Three listboxes and I want to store these listboxes Items in MS Access database. I don't know how to do this.
can any one help me
You can storethe items by running for or while loop with the list count
(Give bref detail about that)
Thanx for Reply
I give you some details:
My project is Making a VAT-Invoice. In this invoice there are Three fields with listbox e.g. 'Sr. No', 'Item Discription', and 'Quantity'. I use Three textbox to enter Values in listbox and a Command Button Name 'ADD'. When user fill all three textboxs and click on 'Add' Button all items add to listboxes. Its OK till now, But Now I have to Store all these three Listboxes items to MS database. I am confuse here, how to do this. And I am also confuse here that What type of field I have to choose in database to store these listbox Items.
Plz Help me. If u can. Send Example code if u can. Thanx.
Thanx for Reply
I give you some details:
My project is Making a VAT-Invoice. In this invoice there are Three fields with listbox e.g. 'Sr. No', 'Item Discription', and 'Quantity'. I use Three textbox to enter Values in listbox and a Command Button Name 'ADD'. When user fill all three textboxs and click on 'Add' Button all items add to listboxes. Its OK till now, But Now I have to Store all these three Listboxes items to MS database. I am confuse here, how to do this. And I am also confuse here that What type of field I have to choose in database to store these listbox Items.
Plz Help me. If u can. Send Example code if u can. Thanx.
why don't you use ListView than listbox...?
you can save with single for or while loop in that list view
Thanx for Reply
I give you some details:
My project is Making a VAT-Invoice. In this invoice there are Three fields with listbox e.g. 'Sr. No', 'Item Discription', and 'Quantity'. I use Three textbox to enter Values in listbox and a Command Button Name 'ADD'. When user fill all three textboxs and click on 'Add' Button all items add to listboxes. Its OK till now, But Now I have to Store all these three Listboxes items to MS database. I am confuse here, how to do this. And I am also confuse here that What type of field I have to choose in database to store these listbox Items.
Plz Help me. If u can. Send Example code if u can. Thanx.
Private Sub cmdAdd_Click()
lvItemList.List Items.Add lvItemList.List Items.Count + 1, , txtSerialNo
lvItemList.List Items(i).SubIte ms(1) = txtDesc.Text
lvItemList.List Items(i).SubIte ms(2) = txtqty.Text
End Sub
Private Sub cmdOk_Click()
For i = 1 To lvItemList.List Items.Count
strSql = ""
strSql = "insert into tblTaxInvoiceDe tail (Slno,Desc,Qty) values(" & Val(lvItemList. ListItems(i).Te xt) & ",'" & lvItemList.List Items(i).SubIte ms(1) & "'," & Val(lvItemList. ListItems(i).Su bItems(2)) & ")"
conn.Execute strSql
Next i
End Sub
Thanx for Codes
I will Try that and tell you my results
Have A Nice Day
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Alan Lane |
last post by:
Hello world:
I have a Parent form with a combobox, where the user selects a Contract or
Estimate number.
Then, on a subform, I have a listbox that gets filled with the details of
the selected Contract.
The subform listbox shows 21 rows.
That has been fine, but now we are starting to get some Contracts or
Estimates with more than 21 items.
|
by: xzzy |
last post by:
I have an app that uses a listbox to display program status messages, and a
public function to be used by the solution to update the listbox.
I do not know how to make the listbox public so it can be updated by that
function.
public class frmMain : System.Windows.Forms.Form{
public System.Windows.Forms.ListBox listBox1;
|
by: Chris Leuty |
last post by:
I am populating a multiselect Listbox from a dataset, with the content of
the listbox filled by one table, and the selections determined from another
table. So far, I have been keeping the dataset a denormalized mirror of the
database, but I'm not having much luck getting the selection logic down (I
haven't found a 'hook' where I can access the listbox object as an object to
set the listitem's selected property before it gets rendered)..
...
|
by: yamne |
last post by:
I have a problem.
When I click in edit datagrid button I show two listbox and two button.
I use two button to move data between two listbox.
My problem is that I can't call the listbox in the button_click function
because the only way to find the listbox is:
(listbox)e.item.findcontrol
What s the solution to this problem?
|
by: Ryan Taylor |
last post by:
Hello.
I have an application where I need the user to be able to add items to a
listbox. I've implemented this via javascript. The listbox is an
<asp:ListBox>. However, when the user submits the form those items do not
get posted. My listbox.Items.Count always returns 0.
I want the user to be able to add items without having to resort to a
postback, hence the javascript. But I need to be able to access those items
in the code behind...
| |
by: JMann101 |
last post by:
I am writing a ASP.NET(VB) application and am having some trouble. I
have a datagrid which list users and when an admin clicks "edit" a
defined column becomes visible and a dynamic listbox control is added
to that column/row. When the admin clicks "update" I am unable to
retrieve the values that were selected from that listbox.
Basically, This is a multi-select listbox, so I need to loop to pull
all selected items. This is the only...
|
by: thomasp |
last post by:
Has anyone got some sample code to do drag and drop from one listbox to
another listbox using VB.Net 2005. The below code works for draging and
droping one at a time, but not for multiselected items. I tried setting up
an array to capture the selected items and then move them with the dragndrop
code, but after selecting the items when the user clicks on the items to
drag them the selection goes back to one item. Also I have code for the...
|
by: Sunray |
last post by:
I have a form called the sales form and i have 2 sets of listboxes
So what happens is. i add items form the bottom set of list boxes which are bound to a data base to the top set of list boxes which are not bound, I select from the bottom set and add to the top set which works fine, but now i decide to remove an item from the top set.
when i tried to use a remove item code it worked fine, it did delete the item form the list but it added...
|
by: Academia |
last post by:
(If you've seen this in the drawing NG, sorry. I inadvertently sent it
there.)
I have a listbox populated with Objects.
The Class has a String field that ToString returns.
I assume that is what the ListBox uses for its display. Correct?
|
by: jh |
last post by:
I'd like to copy/paste into a listbox during runtime. I can do this for a
textbox but can't figure out how to accomplish this for a listbox. Any
help? Thanks.
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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: 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: 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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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...
| |