Wrox Programmer Forums
|
Pro VB Databases Advanced-level VB coding questions specific to using VB with databases. Beginning-level questions or issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 20th, 2007, 06:14 AM
Authorized User
 
Join Date: Oct 2007
Posts: 46
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via MSN to debbiecoates
Default data combo

i am having real trouble getting a data combo to work in my application, having followed a number of tutorials, I still cant get it to work, can anyone see what I am doing wrong.

on startup of my form I set two datacontrols

Set Adodc_Users.Recordset = GetRecordset("Select * from [User]")
Set Adodc_JobTitles.Recordset = GetRecordset("Select * from JobTitle")

on my form i have a datacombo and i set the following properties
DataCombo1.DataField = "JobTitleID"
DataCombo1.BoundColumn = "JobTitleID"
DataCombo1.ListField = "JobTitle"
Set DataCombo1.RowSource = adodc_jobTitles.recordset
Set DataCombo1.DataSource = Adodc_Users.Recordset

when i run the form the datacombo is blank !!! has anyone any idea why the properties wont set?

many Thanks



 
Old December 20th, 2007, 08:23 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

hi there.. something is messed up here.. but I don't remember enough to do it by heart...

why the datasource and the rowsource are diferent?? shouldn't be the same?

does datafield exist in the datasource?? why use the bound column if you are using the list field? also does the boundcolumn exists in the 2 tables??

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========
 
Old January 7th, 2008, 05:46 AM
Authorized User
 
Join Date: Oct 2007
Posts: 46
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via MSN to debbiecoates
Default

To be honest, i have lost myself with all this datagrid stuff, at the end of the day what i am trying to do is create a datagrid, have a combo box in it so that rather than users having to know the ID of the product, they can just select the product, which will update the underlying grid, then have a way of updating, inserting and deleteing into a grid. I spend the best part of a week searching for any type of turorial on datagrids on the net, but cant find anything, so would appriectiat if any one knows of a good datagrid turorial.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Filtering Data from one Combo Box to another Steve1977 ASP.NET 3.5 Basics 1 September 14th, 2008 08:50 AM
Rebinding a data to combo box zaki79 .NET Framework 1.x 2 April 25th, 2008 04:43 AM
Inserting data from combo box bergs77 XSLT 0 January 3rd, 2006 01:09 PM
Drop Down Combo in Data Grid wwwdirzala VB Databases Basics 0 May 24th, 2004 04:44 AM
Combo Box - Data In Use MrDannyP Beginning VB 6 1 November 15th, 2003 10:37 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.