By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,776 Members | 1,302 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,776 IT Pros & Developers. It's quick & easy.

How to create a relation b/w two or more tables

P: 2
This is vinu

I have craeted a simple database.
But i i want to relate them.
ex:- at our office 8 engineers r there.
they r having specific task nos.
Ex :- Say ramesh is having 8 task nos.
i want to create relation b/w those 8 diifferent task nos with ramesh.
i.e, If i select a Rameshkumar name in combo, the only (rameshkumar's) related task no. should be appear in task no combo box.
so, i want to create this type of form,
can any one guide me regarding this.
Dec 18 '07 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 374
Create a List Control with the .RowSource = ""

Then create a Combo Box List that has a list of Names as they appear in the Database table.

Then create SQL string of items that you want in the list: i.e. ( "SELECT fieldName, anotherfieldname FROM [Table Name] Where UserFieldName = '" & me.ComboBoxName.value & "'"

and you set that to your .RowSource = "SELECT...... etc."

then simply enter me.ListControlName.requery

and that's it.

If you have any questions, please let me know.

Hopefully that helps,

Joe P.
Jan 5 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.