Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old March 21st, 2004, 11:30 AM
lxu lxu is offline
Authorized User
Join Date: Oct 2003
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default Retrieve and display data without tbl messed up

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

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.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Retrieve and Display Image asters .NET Framework 1.x 0 September 18th, 2008 03:56 AM
Adding Data to aTbl from another Tbl fwebb Access 3 April 10th, 2007 08:21 AM
retrieve and display selected results babywind BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 0 February 11th, 2005 05:23 AM
Qry to retrieve from 2 tables and display tsimsha Classic ASP Databases 3 October 29th, 2004 02:03 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.