473,320 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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

Hi,
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.
Please.......
Dec 18 '07 #1
1 1172
PianoMan64
374 Expert 256MB
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
me.repaint

and that's it.

If you have any questions, please let me know.

Hopefully that helps,

Joe P.
Jan 5 '08 #2

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

Similar topics

1
by: Dave | last post by:
I have a form which is based on a table (a) with over 6000 records.I have a button on this form which will open another form with related data from another table (b). What I want to do is open the...
11
by: deko | last post by:
If I release a new version of my mbd (in mde format) and users want to upgrade - how do they migrate their data? For example, if the original was released as data1.mde and then I release...
2
by: deko | last post by:
As part of an upgrade routine, I need to delete all relations, drop and import some tables, then reapply the relationships. The error I'm getting is: Error Number 3366: Cannot append a...
4
by: John T. Howard | last post by:
Can you issue commands from VB.Net to create and delete databases? I would like to create, delete, and copy MSAccess tables and/or databases from code. Can this be done? Can you show, or point...
4
by: Jan Nielsen | last post by:
Hi all I'm a former Access developer who would like to implement a many-to-many relation in about the same way you do in Access: With a subform and a combo box. Is it possible to use a...
6
by: Peter W Johnson | last post by:
Hi Guys, I am trying to display a datagrid containing two related datasets. I have filled and related them on MemberID with the following code:- Dim myconnection As Odbc.OdbcConnection
27
by: max | last post by:
Hello, I am a newbye, and I'm trying to write a simple application. I have five tables with three columns; all tables are identical; I need to change some data in the first table and let VB...
1
by: Tim Kelley | last post by:
I have two tables that are linked by 2 fields (ID1 and ID2). Is it possible to create this relation once the tables are in a DataSet? I can create a relation using a single field, but I don't...
4
by: etuncer | last post by:
Hello All, I have Access 2003, and am trying to build a database for my small company. I want to be able to create a word document based on the data entered through a form. the real question is...
3
by: creative1 | last post by:
Here is how you create a complex data report that involves parent and child commands and you can update information at runtime. Its pretty straight forward to work with simple queries; however,...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.