manthiralaya
Registered User.
- Local time
- Today, 20:54
- Joined
- Oct 14, 2010
- Messages
- 13
Dear All,
This is regarding getting values from different table.
I have three Tables named Table1, Table2, Table3.
Fields of Table1 are ID (Primary), MDate, Name, PerID
Fields of Table2 are ID (Primary), MDate, Position, Address
Fields of Table3 are ID (Primary), MDate, City, County
I have a form contiains MDate as ComboBox named cmbMDate and Name, PerID, Position, Address, City, County as TextBox named txtName, txtPerID, txtPosition, txtAddress, txtCity, txtCounty respectively.
In the form, I have made the following setting in the MDate ComboBox properties to display the values from the Table1: (and it displays the values of ‘MDate’ from the Table1)
RowSourceType=Table/Query
RowSource=Table1
ColumnCount=4
ColumnWidths=0cm;4cm;0cm;0cm
BoundColumn=1
I made the following AfterUpdate() even procedure for cmbMDate. (and it too works well to display the Name and PerID)
Now my question is how should I modify the code or linking table or relationship or something else to get the values displayed for txtPosition, txtAddress, txtCity, txtCounty textboxes.
I have also attached the image of table and the databse for your reference.
Thanks in advance for your kind help.
Regards,
manthiralaya
View attachment ForForum251010.zip

This is regarding getting values from different table.
I have three Tables named Table1, Table2, Table3.
Fields of Table1 are ID (Primary), MDate, Name, PerID
Fields of Table2 are ID (Primary), MDate, Position, Address
Fields of Table3 are ID (Primary), MDate, City, County
I have a form contiains MDate as ComboBox named cmbMDate and Name, PerID, Position, Address, City, County as TextBox named txtName, txtPerID, txtPosition, txtAddress, txtCity, txtCounty respectively.
In the form, I have made the following setting in the MDate ComboBox properties to display the values from the Table1: (and it displays the values of ‘MDate’ from the Table1)
RowSourceType=Table/Query
RowSource=Table1
ColumnCount=4
ColumnWidths=0cm;4cm;0cm;0cm
BoundColumn=1
I made the following AfterUpdate() even procedure for cmbMDate. (and it too works well to display the Name and PerID)
Code:
[FONT=Arial]Private Sub cmbMDate_AfterUpdate()[/FONT]
[FONT=Arial]txtName = cmbMDate.Column(2)[/FONT]
[FONT=Arial]txtPerID = cmbMDate.Column(3)[/FONT]
[FONT=Arial]End Sub[/FONT]
Now my question is how should I modify the code or linking table or relationship or something else to get the values displayed for txtPosition, txtAddress, txtCity, txtCounty textboxes.
I have also attached the image of table and the databse for your reference.
Thanks in advance for your kind help.
Regards,
manthiralaya
View attachment ForForum251010.zip
