Retrieve and display data without tbl messed up
Hi,
I would like to use a code selected in Form 2 to retrieve the data in a table and display the row on Form 1. I have trouble to have the data shown on Form-1 without backend table messed up after selecting a code from Form-2.
Here are the table and Forms,
Table: myDb
Name Type Definition Parent
DI A1 Text 1 PD
ED A2 Text 2 DI
PM A2 Text 3 DI
Form-1 (Single Form):
The form Includes: Text Fields, a Combo box and buttons (such as Delete)
Form-1 Properties
Record Source: SELECT myDb.definition, myDb.parent, myDb.type FROM myDb WHERE myDb.name = Forms![Form-1]! cbxNm
Combo box, cbxNm: include a list of Name of myDb, DI, ED, PM. â¦,
Combo box properties:
1. unbound
2. Row Source Type: Table/Query
3. Row Source: SELECT myDb.Name FROM myDb WHERE myDb.Type = Forms![Form-1]!Type ORDER BY myDb.Name
How to work:
1. Select âDIâ from the combo box
2. Type = âA1â, Definition = âTest 1", Parent = âPDâ are displayed in text fields of Form-1
3. Click on Delete button to retrieve the information of where âDIâ is being used, and open Form-2 to display the data on it
Form-2
Display the where used information in a tabular format:
Deleted code Name something else
------------ -------- ------------------
DI ED â¦.
DI PM â¦.
How to work:
1. Double click a Name, for example âPMâ
2. Focus shifts to Form-1
3. "PMâ is focused and highlighted on the combo box
4. Display PM related information in the text fields on Form-1 (???)
I expected the related information of âPMâ, Type = A2, Definition = Test 3 and Parent-class=âDIâ, are displayed on Form-1 after âPMâ is focused on combo box. I tried to use âPMâ as key for SQL selection to get data and used formâs setValue to set the data on each text field of Form-1. Front end looked ok, but table myDb was messed up. How can I change it?
Thanks in advance for suggestions.
lx
|