Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB Databases
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 18th, 2007, 02:49 PM
Registered User
 
Join Date: Jul 2007
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Assigning 2 BindingSources to a BindingNavigator

Hi Guys,

I am using Visual Basic 2005 Express. I'm just wondering if you guys can help. I have created 2 Tables with SQL Server Express 2005 as follows:

CUSTOMER
CUSTOMER_ID (PK), CUSTOMER_NAME, CUSTOMER_TYPE


CUSTOMER_CONTACTS
CUSTOMER_ID (PK, FK), CONTACT_NAME, CONTACT_1, CONTACT_2, CITY/TOWN, TELEPHONE


I have also created the data source and dataset via Visual Basic 2005 Express. But I just want to use one Visual Basic form for both tables for data entry, and at the same should be able to navigate through the detail form records. Is this possible? How can I implement these using ONE BindingNAVIGATOR for both tables?

In other words, how can I go about assigning 2 BindingSources to one BindingNavigator control?
Reply With Quote
  #2 (permalink)  
Old July 18th, 2007, 02:52 PM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

hi there.. you want this behavior because contacts and customers are related?? if that is the case, you can do a query that join the 2 tables and that will be a better solution... ;)

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
================================================== =========
Reply With Quote
  #3 (permalink)  
Old July 18th, 2007, 03:13 PM
Registered User
 
Join Date: Jul 2007
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Gonzalo,

Thanks for getting back to me. Yes, both tables are related on ID foreign key. Is it possible for you to help me remember once more on how to assign a query to the BindingNavigator?

Thanks once more.

Reply With Quote
  #4 (permalink)  
Old July 19th, 2007, 07:17 AM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

well.. never use that control.. but for sure it has a datasource property.. you have to assing a datatable to it (in this case, the query you do...)

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
================================================== =========
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
BindingNavigator Question wb8bgy Visual Basic 2005 Basics 17 February 19th, 2008 11:02 AM
BindingNavigator Exception osorio.agustin Visual Basic 2005 Basics 0 March 13th, 2007 08:39 PM
bindingNavigator problem! angelran C# 2005 2 January 21st, 2007 05:57 AM
Bindingnavigator ldg_louie Visual Basic 2005 Basics 0 June 8th, 2006 07:02 PM
BindingNavigator Question lixin8111 Visual Basic 2005 Basics 0 May 25th, 2006 09:34 PM



All times are GMT -4. The time now is 08:51 PM.


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