Solved

Need serious help with data conection problem

Posted on 2002-04-29
4
134 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
  • 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 200 total points
ID: 6996190
I have modified a little bit and sent it to you.

Can you confirm?

Thanks

Narayanan
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

707 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now