|
-
Feb 16th, 2011, 06:06 AM
#1
Thread Starter
New Member
[RESOLVED] Connect database field to database field
Hi guys and girls, in first place sorry for my english.
I really need help, I created a local Database in VB2008 with 4 tables, the problem is that I have a textbox in one table and a combobox in other table and I want that the information that I put in textbox appear after in combobox from the other table... that's possible?
Table: Filmes ... Field: NomeTextBox
Table: Tempo de Aluguer ... Field: Nome_FilmeComboBox
-
Feb 16th, 2011, 06:45 AM
#2
Fanatic Member
Re: Connect database field to database field
I dont understand on your question. do you want to say that when you add some entry in textbox on one form so that you want to display that entry in combobox?
-
Feb 16th, 2011, 08:32 AM
#3
Re: Connect database field to database field
Welcome! 
Perhaps if you gave us the table structure we could figure it out. Normally textboxes and comboboxes don't go in tables.
VB6 Library
If I helped you then please help me and rate my post!
If you solved your problem, then please mark the post resolved
-
Feb 16th, 2011, 09:58 AM
#4
Thread Starter
New Member
Re: Connect database field to database field
I have 2 different tables in 2 different forms and I want that when I put a string in textbox and save that string appear on combobox list from the other form...
-
Feb 16th, 2011, 10:02 AM
#5
Re: Connect database field to database field
You can create a method on the form with the combobox to add an item to it.
VB6 Library
If I helped you then please help me and rate my post!
If you solved your problem, then please mark the post resolved
-
Feb 16th, 2011, 10:38 AM
#6
Thread Starter
New Member
Re: Connect database field to database field
 Originally Posted by MarMan
You can create a method on the form with the combobox to add an item to it.
And how I do that ?
-
Feb 16th, 2011, 10:40 AM
#7
Re: Connect database field to database field
VB6 Library
If I helped you then please help me and rate my post!
If you solved your problem, then please mark the post resolved
-
Feb 16th, 2011, 10:59 AM
#8
Thread Starter
New Member
Re: Connect database field to database field
 Originally Posted by MarMan
Create a public sub.
And I can do that with a field from database?
-
Feb 16th, 2011, 11:00 AM
#9
Hyperactive Member
Re: Connect database field to database field
This would add the text from a Textbox on one form to the list of items in a combobox on another. Is that what you're trying to do?
Code:
ComboBox1.Items.Add(Form1.TextBox1.Text)
-
Feb 17th, 2011, 05:30 AM
#10
Thread Starter
New Member
Re: Connect database field to database field
 Originally Posted by dkahn
This would add the text from a Textbox on one form to the list of items in a combobox on another. Is that what you're trying to do?
Code:
ComboBox1.Items.Add(Form1.TextBox1.Text)
I think that is something like that but didn't work because combobox and textbox are both fields from a localdatabase.
Already I solved the problem ... I used the option "Use data bound items" and solved 
Thanks for your help.
Last edited by RuNaWaY; Feb 17th, 2011 at 05:59 AM.
-
Feb 17th, 2011, 08:25 PM
#11
Fanatic Member
Re: Connect database field to database field
 Originally Posted by RuNaWaY
I have 2 different tables in 2 different forms and I want that when I put a string in textbox and save that string appear on combobox list from the other form...
call the database at the form load event on that form where you want to see the data and bind the specific field with combobox
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|