Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Need serious help with data conection problem

Posted on 2002-04-29
4
Medium Priority
?
142 Views
Last Modified: 2010-05-02
I a currently writing a program for my final year project and have hit a number of major stumbling blocks.

the first problem is that I have 6 combo boxes with different names propagating (adding items) from the same database table. When I select a name from one combo box and then try to select a name from a different box the program throughs an error that is not reconised by the MSDN help files.

What I am trying to do is using curtin criteria add the aproprate names to each of the 6 boxes, it dose this ok. then the useser should be able to select a name from each combo box and click a button to store them to a seperate database table. At present I can not select from one box before it throws an error.

Dose anyone have any ideas what is wrong and how to fix it. I can send you the code if you wish to try.


==========  EXTRA bit ===========

By the way there are more points on offer(aprox:1000 or more) if someone out there can help me get the whole program working properly before the deadline of the 15th of may. A full explenation of the program will be given and a list of the final few bugs that need sorted.  Incase any of you are wondering I am not cut out to be a programmer but will fail my degree if I dont get this working and I have worked so hard over the last few years to get betten by something I have never been taught about. non of my lectures can help so this is my last hope.
 
if you are interested in helping with the extra bit please leave me a message with a contact for you and the line "I am willing to help".  
I know this is cheeky but I am so desperate and  and thing is a try.

=================================================

0
Comment
Question by:Karen-Ann
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 1

Expert Comment

by:jmgs082598
ID: 6978370
Could you pls put the CODE, in order to check it.
0
 
LVL 18

Expert Comment

by:mdougan
ID: 6978630
There are two different approaches to reading and writing information to the database.  One is the "bound" approach, and another is the "unbound" approach.

Most people start out trying to use Data Controls and the Bound approach.  This is fine, as it requires miminal coding, but often it can cause strange problems.  My preference is for the "unbound" approach, but this requires a lot more code.

My guess is that you are using a data control (if so, are you using an ADODC data control or a DAO data control?)

And, you are setting the DataSource  property of a list or combo box to the name of the data control, and the DataField property of the combo or list to the field name which is the source of the list.

The problem is if you are trying to set several combo boxes/list boxes on the form to the same datafield, the data control is going to get very confused about which combo/list to use when updating the data in the data control (because bound controls automatically update the DB when you move from one record to the next).

Instead of using standard listboxes or combo boxes, you need to use the Microsoft DataBound List control.  You would use this in combination with two data controls on your form.  One data control would be set to the table and field that you want to use to populate the lists.  The other data control would be set to the table and columns that you want to update.

Then, in the Databound List Control you can set different DataSources/DataFields for the List, and "bind" the control to update another datasource/datafield.  To set the proper values, click on the property called DataBindings in the DataBound list's property box.
0
 
LVL 3

Expert Comment

by:n_narayanan
ID: 6979456
Send me your project to n_narayanan@yahoo.com

I will modify and send it to you.

Cheers

Narayanan.
0
 
LVL 3

Accepted Solution

by:
n_narayanan earned 800 total points
ID: 6996190
I have modified a little bit and sent it to you.

Can you confirm?

Thanks

Narayanan
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question