473,785 Members | 2,879 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Update a text box in regard to the item seleted in the combo box

6 New Member
i am trying to implement an application in order to keep rercords of the stationary of a company. i have a combo box named ComboP_Name In FormProducts form,which is getting the values from the ProductName field of products table and ActualQOH is the table which is getting the corresponding quantity on hand value from the same table, the problem is it does not work that way. when i select the product i want from the combo box the textbox does not get the corresponding value. if i still try to update it will generate a msg saying

"the cahnges you requested to the table were not successful because they would create duplicate values in the index, primary key or relationship. Chnage the data in the field or fields thatcontain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again"

i am not trying to update the primary key of the products table which is the ProductName, i am just trying to update the Qty on Hand.
but when i use the navigation keys o when i enter a number their it will redirect to the product i want and update the qty on hand.

i need help and need to hand this over by tomorrom. i have lyk 21 hours...
thanx in advance
Dec 7 '09 #1
6 1895
aBheE
6 New Member
i got tym till 2mro....plz guys...can sm1 plz help me put hea..thanx
Dec 8 '09 #2
hjozinovic
167 New Member
aBheE,
The problem here must be in the way you join your tables.
If you want you could attach a sample DB here or send it to me directly and I could help you with that right now.
Dec 8 '09 #3
aBheE
6 New Member
No joined tables are used in this particular form. I dont know y. i have mailed u the DB. please can u check that and let me know. thanx for ur concideration..
Dec 9 '09 #4
aBheE
6 New Member
plz. can SOME ONE check this attatchment and advice me on what i shud do..thnx
the problem is occuring on form "Products"
Thanx

New Folder.zip
Dec 9 '09 #5
Pr1nnyraid
7 New Member
I might have miss interpreted your question... but a possible solution might be to edit the control source of the text box to display the stored value in the combo box.

In the property sheet , add in "=[Forms]![ProductName]![ComboP_Name]" without the quotes
Dec 9 '09 #6
aBheE
6 New Member
thanx.... but it doesnt seem to be wrkin.... my issue is i can select an item from the combo by going thru the data 1 by 1. and also can use that scroll thing of the mouse to navigate trhu the items. but wen i click on the combo(when it drops down) i can select an i tem...
guess this is clear...f not pls lemme kno..thanx
Dec 9 '09 #7

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

Similar topics

1
3737
by: Daniel Hill | last post by:
OK, I have very, VERY basic background knowledge of VB6 and have now upgraded to VB.NET and now I'm struggling to bring up the forms I want. What I am looking to do is to have a click a command button bring up a form, and to have which form is brought up determined by which item is selected in the accompanying combo box. I've gathered that you have to declare the item as a
10
9387
by: Hank1234 | last post by:
Can I use one Data Adapter and one Command Builder to update amny tables? Currently in my data adapter I query two tables and fill them into two tables in a data set. When I make a change to a record in the second table and call the update method of the data adapter the command builders update command text is for the first table. Can the command builder handle two tables? Code example: Dim oCOnn As New SqlConnection("Data Source=.;" &...
1
2346
by: Maria Joao | last post by:
I have two synchronized combo boxes and after the selection of the desired record, I need the user to open the related report, by pressing a button. My problem is that a combo box doesn't update do the first one. The record are correct, but the first one is always from the last selection. How can I update the second combo box? Thanks
9
4778
by: Pam Ammond | last post by:
I need the code to update the database when Save is clicked and a text field has changed. This should be very easy since I used Microsoft's wizards for the OleDBAdapter and OleDBConnection, and DataSet; and all I'm doing is showing one record in text fields, allowing the user to modify the text fields, and then updating the database again when the user clicks the Save button. The fields already show the correct data record since I have...
9
4295
by: Geraldine Hobley | last post by:
Hello I'm getting the above mentioned error in my applicatio I have a datagrid bound to a datasource like s MyDatagrid.DataSource = Mydataset.Tables(Order) - this all works fine However I have another field on the form which is a richtextbox and is bound to another field in the same datasourc like s Me.RtxtDialog.DataBindings.Add("text", MyDataset.Tables.Item("Orders"), "MyRichTextField") - this field accepts nulls in the databas
5
2179
by: explode | last post by:
I made a procedure Public Sub Novo(ByVal nova1 As String, ByVal nova2 As String) that creates a new oledbDataAdapter with insert update select and delete commads. I also added that commands can change depending how many columns are in a Table. I add a new column with this code: Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Try...
2
3624
by: jw01 | last post by:
I have a form in which there is one combo box and three text boxes: Combo Box: -> Item A -> Item B -> Item C TextBox1: TextBox2: TextBox3:
7
3582
by: Brad Pears | last post by:
I have something strange going on - pretty sure it used to work before - and now it does not... Why does the following code not clear a combo box? Me.cboLocation.Text = String.Empty OR Me.cboLocation.Text = ""
0
9645
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, 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...
0
9480
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,...
0
10152
jinu1996
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...
1
10092
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,...
0
8974
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, 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...
0
6740
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();...
0
5381
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...
2
3650
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2880
bsmnconsultancy
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.